kiel.compression.snappy

kiel.compression.snappy.compress(data)[source]

Compresses given data via the snappy algorithm.

The result is preceded with a header containing the string ‘SNAPPY’ and the default and min-compat versions (both 1).

The block size for the compression is hard-coded at 32kb.

If python-snappy is not installed a RuntimeError is raised.

kiel.compression.snappy.decompress(data)[source]

Decompresses the given data via the snappy algorithm.

If python-snappy is not installed a RuntimeError is raised.