{"id":3519,"library":"isal","title":"isal","description":"isal (python-isal) provides faster zlib and gzip compatible compression and decompression by offering Python bindings for the Intel® Intelligent Storage Acceleration Library (ISA-L). It includes `isal_zlib` and `igzip` as high-performance, largely drop-in replacements for the standard library's `zlib` and `gzip` modules, respectively, along with `igzip_threaded` for multi-threaded streaming and `igzip_lib` for direct ISA-L API access. The current version is 1.8.0, and it maintains an active development and release cadence.","status":"active","version":"1.8.0","language":"en","source_language":"en","source_url":"https://github.com/pycompression/python-isal","tags":["compression","zlib","gzip","isa-l","performance"],"install":[{"cmd":"pip install isal","lang":"bash","label":"Via pip"},{"cmd":"conda install python-isal","lang":"bash","label":"Via Conda"}],"dependencies":[{"reason":"Provides the underlying accelerated compression algorithms. Wheels typically include a statically linked version; source builds may require ISA-L development headers.","package":"ISA-L","optional":false}],"imports":[{"note":"Drop-in replacement for the standard `zlib` module.","symbol":"isal_zlib","correct":"from isal import isal_zlib"},{"note":"Drop-in replacement for the standard `gzip` module.","symbol":"igzip","correct":"from isal import igzip"},{"note":"Provides multi-threaded buffered read/write streams.","symbol":"igzip_threaded","correct":"from isal import igzip_threaded"},{"note":"Direct access to ISA-L's compression functions.","symbol":"igzip_lib","correct":"from isal import igzip_lib"}],"quickstart":{"code":"from isal import isal_zlib\n\noriginal_data = b\"Python-isal offers faster compression and decompression.\" * 10\n\n# Compress data\ncompressed_data = isal_zlib.compress(original_data)\n\n# Decompress data\ndecompressed_data = isal_zlib.decompress(compressed_data)\n\nassert original_data == decompressed_data\n\nprint(f\"Original size: {len(original_data)} bytes\")\nprint(f\"Compressed size: {len(compressed_data)} bytes\")\nprint(\"Data compressed and decompressed successfully using isal_zlib.\")","lang":"python","description":"This example demonstrates basic compression and decompression using `isal_zlib`, highlighting its direct compatibility with the standard `zlib` module's API."},"warnings":[{"fix":"Ensure your project runs on Python 3.10 or newer.","message":"As of a recent release (likely 1.8.0), Python 3.8 and 3.9 are no longer officially supported, despite PyPI metadata potentially indicating support for `>=3.9`.","severity":"breaking","affected_versions":"1.8.0 and later"},{"fix":"Adjust compression level usage or explicitly choose a higher level if you expect actual compression.","message":"Compression level `0` in `isal_zlib` and `igzip` corresponds to the *lowest* compression level, unlike `zlib` and `gzip` where `0` means 'no compression'.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Prefer `Z_DEFAULT_STRATEGY` or be aware that other strategies might behave differently or issue warnings.","message":"`isal_zlib` primarily supports `Z_DEFAULT_STRATEGY`. While other strategies are exposed for compatibility, using them may result in warnings as ISA-L might not fully implement them.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Use `igzip` for files requiring seeking, or manage your data in a strictly streaming fashion with `igzip_threaded`.","message":"`igzip_threaded`'s `open` function returns buffered read/write streams that are designed for streaming only and do not support seeking operations.","severity":"gotcha","affected_versions":"All versions"},{"fix":"When using `igzip.open`, avoid strict type checks against `gzip.GzipFile` or use `igzip.GzipFile` alias if specific compatibility is needed.","message":"`igzip.open` returns an `IGzipFile` class instance, not the standard `GzipFile`. While `igzip.GzipFile` exists as an alias for compatibility, direct type checking or relying on `GzipFile`-specific internal behavior might break.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}