You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Python example to compress a string with snappy can't be decompressed with the command line tool example to decompress a file with the same string in it. The command line tool should be expanded to support this use case, or at the very least a second programmatic example explaining how to create a file which can be read with the tool.
Indeed, it is not obvious that files should be in the "framing format" rather than the simpler, implicit snappy.de/compress functions. This is the code that would do it
import snappy
import io
src = io.BytesIO(b'hello world')
with open('compressed_file.snappy', 'wb') as dst:
snappy.stream_compress(src, dst)
(substitute an open input file for src instead of the in-memory buffer, if desired)
Python example to compress a string with snappy can't be decompressed with the command line tool example to decompress a file with the same string in it. The command line tool should be expanded to support this use case, or at the very least a second programmatic example explaining how to create a file which can be read with the tool.
UncompressError: chunk truncated
The text was updated successfully, but these errors were encountered: