{"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":"python","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,"search_vec":"'1.8.0':77 'acceler':24 'access':72 'activ':82 'along':54 'api':71 'bind':18 'cadenc':86 'compat':11 'compress':12,87 'current':74 'decompress':14 'develop':83 'direct':67 'drop':41 'drop-in':40 'faster':7 'gzip':10,51,89 'high':37 'high-perform':36 'igzip':34,56,64 'includ':30 'intel':21 'intellig':22 'isa':27,69,91 'isa-l':26,68,90 'isal':1,2,5,31 'l':28,70,92 'larg':39 'lib':65 'librari':25,47 'maintain':80 'modul':52 'multi':60 'multi-thread':59 'offer':16 'perform':38,93 'provid':6 'python':4,17 'python-is':3 'releas':85 'replac':43 'respect':53 'standard':46 'storag':23 'stream':62 'thread':57,61 'version':75 'zlib':8,32,49,88","created_at":"2026-04-11T17:33:05.218455+00:00","updated_at":"2026-04-16T15:48:20.569359+00:00","problems":[{"fix":"Install the necessary build dependencies for your operating system (e.g., `sudo apt-get install build-essential zlib1g-dev autoconf automake libtool` on Debian/Ubuntu, or corresponding development tools on other platforms) before running `pip install isal`.","cause":"The `isal` library has C extensions and requires build tools (like a C compiler, `autoconf`, `automake`, `libtool`) to be present on the system for successful installation, especially if a pre-built wheel is not available for the specific platform or Python version.","error":"error: subprocess-exited-with-error"},{"fix":"First, ensure `isal` is installed via `pip install isal`. Then, correct the import statement to `from isal import isal_zlib` or `from isal import igzip` as per the library's structure.","cause":"This error occurs if the `isal` package is not installed, or if the `isal_zlib` submodule is being imported incorrectly, for example, by trying to import it directly instead of from the `isal` package.","error":"ModuleNotFoundError: No module named 'isal_zlib'"},{"fix":"When using `isal_zlib` or `igzip`, ensure you only use the explicitly supported flush modes: `isal_zlib.NO_FLUSH`, `isal_zlib.SYNC_FLUSH`, `isal_zlib.FULL_FLUSH`, or `isal_zlib.FINISH_FLUSH`.","cause":"`isal_zlib` and `igzip` have a more limited set of supported flush modes (NO_FLUSH, SYNC_FLUSH, FULL_FLUSH, FINISH_FLUSH) compared to the standard Python `zlib` module, and using unsupported modes will result in an error.","error":"Other flush modes are not supported and will raise errors."},{"fix":"Try updating the `isal` package to its latest version, as updates may address issues with ISA-L builds and file handling. Alternatively, pre-process the problematic gzip file to ensure it contains only a single valid gzip stream, for example, by decompressing and re-compressing it using standard `gzip` or `pigz`.","cause":"This error can occur when `igzip` attempts to decompress a gzip file that contains multiple concatenated gzip streams, especially with certain file structures or when using an older version of the underlying ISA-L library.","error":"OSError: igzip: Error while decompressing extra concatenated gzip files"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"1.8.0","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/pycompression/python-isal","docs":"https://python-isal.readthedocs.io","changelog":null,"pypi":"https://pypi.org/project/isal/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["serialization","data"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-28","last_verified":"2026-08-29","next_check":"2026-07-28","install_tag":null}}