autocompress-rs
Automatically select suitable decoder from magic bytes or encoder from file extension. This library also provides I/O thread pool to perform decompression and compression in background threads.
Supported file formats
- Gzip
- Zlib (Cannot suggest format from magic bytes and file extension)
- BZip2
- XZ
- Snappy (Cannot suggest format from file extension)
- Z-standard
- LZ4
- Brotli (Cannot suggest format from magic bytes)
Feature flags
default
,full
: Enable all features.gzip
: Enable gzipsnap
: Enable snappyzstd
: Enable Z-standardbzip2
: Enable bzip2lz4
: Enable LZ4xz
: Enable XZbrotli
: Enable Brotlithread
: Enable threaded I/O
Example
use open;
use ;
I/O thread example
use ;
use ;