Package: isal
python-isalFaster zlib and gzip compatible compression and decompression
by providing Python bindings for the ISA-L library.This package provides Python bindings for theISA-Llibrary. The Intel(R) Intelligent Storage
Acceleration Library (ISA-L) implements several key algorithms inassembly
language. This includes
a variety of functions to provide zlib/gzip-compatible compression.python-isalprovides the bindings by offering four modules:isal_zlib: A drop-in replacement for the zlib module that uses ISA-L to
accelerate its performance.igzip: A drop-in replacement for the gzip module that usesisal_zlibinstead ofzlibto perform its compression and checksum tasks, which
improves performance.igzip_threadedoffers anopenfunction which returns buffered read
or write streams that can be used to read and write large files while
escaping the GIL using one or multiple threads. This functionality only
works for streaming, seeking is not supported.igzip_lib: Provides compression functions which have full access to the
API of ISA-L’s compression functions.isal_zlibandigzipare almost fully compatible withzlibandgzipfrom the Python standard library. There are some minor differences
see:differences-with-zlib-and-gzip-modules.QuickstartThe python-isal modules can be imported as followsfromisalimportisal_zlibfromisalimportigzipfromisalimportigzip_libisal_zlibandigzipare meant to be used as drop in replacements so
their api and functions are the same as the stdlib’s modules. Except where
ISA-L does not support the same calls as zlib (See differences below).A full API documentation can be found onour readthedocs page.python-misal.igzipimplements a simple gzip-like command line
application (just likepython-mgzip). Full usage documentation can be
found onour readthedocs page.Installationwith pip:pip install isalwith conda:conda installpython-isalInstallation is supported on Linux, Windows and MacOS. For more advanced
installation options check thedocumentation.python-isal as a dependency in your projectPython-isal supports a limited amount of platforms for which wheels have been
made available. To prevent your users from running into issues when installing
your project please list a python-isal dependency as follows.setup.cfg:install_requires =
    isal; platform.machine == "x86_64" or platform.machine == "AMD64" or platform.machine == "aarch64"setup.py:extras_require={
    ":platform.machine == 'x86_64' or platform.machine == 'AMD64' or platform.machine == 'aarch64'": ['isal']
},Differences with zlib and gzip modulesCompression level 0 inzlibandgzipmeansno compression, while
inisal_zlibandigzipthis is thelowest compression level.
This is a design choice that was inherited from the ISA-L library.Compression levels range from 0 to 3, not 1 to 9.isal_zlib.Z_DEFAULT_COMPRESSIONhas been aliased toisal_zlib.ISAL_DEFAULT_COMPRESSION(2).isal_zlibonly supportsNO_FLUSH,SYNC_FLUSH,FULL_FLUSHandFINISH_FLUSH. Other flush modes are not supported and will raise errors.zlib.Z_DEFAULT_STRATEGY,zlib.Z_RLEetc. are exposed asisal_zlib.Z_DEFAULT_STRATEGY,isal_zlib.Z_RLEetc. for compatibility
reasons. However,isal_zlibonly supports a default strategy and will
give warnings when other strategies are used.zlibsupports different memory levels from 1 to 9 (with 8 default).isal_zlibsupports memory levels smallest, small, medium, large and
largest. These have been mapped to levels 1, 2-3, 4-6, 7-8 and 9. Soisal_zlibcan be used with zlib compatible memory levels.igzip.openreturns a classIGzipFileinstead ofGzipFile. Since
the compression levels are not compatible, a difference in naming was chosen
to reflect this.igzip.GzipFiledoes exist as an alias ofigzip.IGzipFilefor compatibility reasons.igzip._GzipReaderhas been rewritten in C. Since this is a private member
it should not affect compatibility, but it may cause some issues for
instances where this code is used directly. If such issues should occur,
please report them so the compatibility issues can be fixed.ContributingPlease make a PR or issue if you feel anything can be improved. Bug reports
are also very welcome. Please report them on thegithub issue tracker.AcknowledgementsThis project builds upon the software and experience of many.  Many thanks to:TheISA-L contributorsfor making ISA-L.
Special thanks to @gbtucker for always being especially helpful and
responsive.TheCython contributorsfor making it easy
to create an extension and helping a novice get start with pointer addresses.TheCPython contributors.
Python-isal mimickszlibmodule.candgzip.pyfrom the standard
library to make it easier for python users to adopt it.@marcelmfor taking a chance on this project
and make it a dependency for hisxopenand by extensioncutadaptprojects. This gave python-isal its
first users who used python-isal in production.Mark Adler (@madler) for the excellent comments in his pigz code which made
it very easy to replicate the behaviour for writing gzip with multiple
threads using thethreadingandisal_zlibmodules. Another thanks
for his permissive license, which allowed the crc32_combine code to be
included in the project. (ISA-L does not provide a crc32_combine function,
unlike zlib.) And yet another thanks to Mark Adler and also for
Jean-loup Gailly for creating the gzip format which is very heavily used
in bioinformatics. Without that, I would have never written this library
from which I have learned so much.Thegithub actions teamfor
creating the actions CI service that enables building and testing on all
three major operating systems.@animalizefor explaining how to test and
build python-isal for ARM 64-bit platforms.And last but not least: everyone who submitted a bug report or a feature
request. These make the project better!Python-isal would not have been possible without you!