A Python library providing deflate64 compression and decompression functionality. It leverages the zlib-ng library for efficient performance and natively supports the larger dictionary sizes (up to 64KB) characteristic of deflate64, which can be beneficial for highly repetitive large files. The current version is 1.0.4. Releases are infrequent, typically for minor fixes or updates.
pip install inflate64Verified import paths — ran on the pinned version, not inferred.
Demonstrates basic compression and decompression of a byte string using `inflate64.deflate` and `inflate64.inflate`. The `max_buffer_size` parameter in `inflate` is highlighted as a critical consideration for robust decompression.
Always provide a `max_buffer_size` to `inflate64.inflate` that is at least as large as the expected decompressed data. For unknown sizes, use a generous estimate or set to 0 and implement robust error handling to catch `inflate64.error`.
Understand that the library handles the deflate64-specific dictionary size implicitly. Use `wbits=15` for standard zlib streams, `-15` for raw deflate streams, or `31` for gzip streams, as you would with a standard `zlib` library.
If `pip install inflate64` fails with compilation errors, ensure you have the necessary C compiler tools installed on your system. For Windows, install 'Build Tools for Visual Studio'; for Debian/Ubuntu, `sudo apt-get install build-essential`.
For deflate (compression) functionality, use Python's standard `zlib` library, or another dedicated compression library. The `inflate64` library focuses solely on `inflate` (decompression) with deflate64 support.
Replace calls to `inflate64.deflate()` with an instantiation of the `inflate64.Deflater` class. For example, use `compressor = inflate64.Deflater(level=9)` and then use its methods like `compressed_data = compressor.compress(data) + compressor.flush()` for compression.
No dependency data recorded yet.