Home

Awesome

LibDeflate.jl

CI Codecov

This package provides Julia bindings for libdeflate.

Libdeflate is a heavily optimized implementation of the DEFLATE compression algorithm used in the zip, bgzip and gzip formats. Unlike libz or gzip, libdeflate does not support streaming, and so is intended for use in of files that fit in-memory or for block-compressed files like bgzip. But it is significantly faster than either libz or gzip.

This package provides simple functionality for working with raw DEFLATE payloads, zlib and gzip data. It is intended for internal use by other packages, not to be used directly by users. Hence, its interface is somewhat small.

:warning: This package ONLY works with in-memory buffers, and ONLY buffers with a length < 2^32 bytes :warning:

Interface

Many functions have a "safe" and an "unsafe" variant. The unsafe works with pointers, the safe attempts to convert Julia objects to ReadableMemory or WriteableMemory, which are simply structs containing pointers. When possible, use the safe variants as the overhead is rather small.

For more details on these functions, read their docstrings which define their API. Functions and types without a docstring are internal.

No functions here are expected to throw errors. On error, they return a LibDeflateError object.

Common exported types

Working with DEFLATE payloads

Working with gzip files

Working with Libz files

Miscellaneous