python-blosc icon indicating copy to clipboard operation
python-blosc copied to clipboard

Issues decompressing bytes from files

Open brendanofallon opened this issue 4 years ago • 0 comments

This is probably user error, but I'm running into an issue compressing a file on the command line and decompressing it inside python. For example:

$ blpk --version                                                            
bloscpack: '0.16.0' python-blosc: '1.10.2' blosc: '1.21.0'

$ blpk compress foo.csv foo.csv.blp

$ ipython
 In [1]: import blosc
 In [2]: blosc.__version__
 Out[2]: '1.10.2'
 In [3]: blosc.decompress(open('foo.csv.blp', 'rb').read())
 ...
 error: Error 39148941 : not a Blosc buffer or header info is corrupted

The file decompresses just fine using blpk on the command line, but doesn't seem to work using python-blosc for some reason. When saving compressed data from within python, I am able to decompress it without issue, but something about the format of the command-line produced data seems to cause an issue with decompression. Similar code works fine with other compression utilities like gzip and lz4

brendanofallon avatar Sep 28 '21 18:09 brendanofallon