cmeel-zlib

1.3.1 · active · verified Thu Apr 16

`cmeel-zlib` is a specialized Python package that provides a distribution of the `zlib` C library, packaged using `cmeel` (a CMake-based build system for Python wheels). Its primary purpose is to serve as a build dependency for other Python packages that are also built with `cmeel` and require the `zlib` C library. It does not offer a direct Python API. The current version is 1.3.1, with minor releases typically occurring every 2-3 months.

Common errors

Warnings

Install

Imports

Quickstart

After installing `cmeel-zlib`, you can use the standard Python `zlib` module. This package ensures that the underlying C `zlib` library is correctly provided and linked for efficient compression and decompression, especially when other `cmeel`-built extensions depend on it. This example demonstrates basic usage of the standard `zlib` module, which benefits from `cmeel-zlib`'s provision of the underlying C library.

import zlib

data = b"Hello, cmeel-zlib compression example!" * 10
compressed_data = zlib.compress(data)
decompressed_data = zlib.decompress(compressed_data)

print(f"Original size: {len(data)} bytes")
print(f"Compressed size: {len(compressed_data)} bytes")
print(f"Decompressed data matches original: {data == decompressed_data}")
# cmeel-zlib ensures that the underlying zlib C library is available
# and correctly linked for the standard library's zlib module and other
# cmeel-based extensions, potentially offering optimized performance.

view raw JSON →