cramjam 1.1.0

Thin Python bindings to de/compression algorithms in Rust
Documentation

pyrus-cramjam

Code Style CI

API Documentation

Install

pip install --upgrade cramjam  # Requires no Python or system dependencies!

Extremely thin Python bindings to de/compression algorithms in Rust. Allows for using algorithms such as Snappy, without any system dependencies.

This is handy when being used in environments like AWS Lambda, where installing packages like python-snappy becomes difficult because of system level dependencies.


Available algorithms:

  • Snappy
  • Brotli
  • Lz4
  • Gzip
  • Deflate
  • ZSTD

All available for use as:

>>> import cramjam
>>> compessed = cramjam.snappy_compress(b"bytes here")
>>> cramjam.snappy_decompress(compressed)
b"bytes here"

Where the API is cramjam.<compression-variant>_compress/decompress and only accepts python byte strings