A streaming bzip2 compressor.
@class Compressor
@eryx/compression/bzip2 ModuleBzip2 compression utilities.
A streaming bzip2 compressor.
@class Compressor
A streaming bzip2 decompressor.
@class Decompressor
Compress data with bzip2.
input bytes to compress
block size 1..9 (higher=better compression)
compressed bzip2 stream blockSize: 1 (BLOCK_FAST, least memory) - 9 (BLOCK_BEST, best compression). Default 9. Controls the Burrows-Wheeler block size; higher = better ratio but ~100 KB more memory per level during compression.
Decompress bzip2 data.
compressed bzip2 stream
use small-memory decoder when true
decompressed bytes small: if true, uses an alternative algorithm (~2 MB vs ~3.5 MB RAM) at roughly half the speed. Useful in memory-constrained environments.
Conservative upper bound on compressed output size for len input bytes.
input length in bytes
upper bound on compressed size The exact formula is approximately len * 1.01 + 600.
Creates a streaming bzip2 compressor.
block size 1..9
the streaming compressor
Creates a streaming bzip2 decompressor.
use small-memory decoder
the streaming decompressor
bzip2.BLOCK_FAST = 1 - fastest, least memorybzip2.BLOCK_BEST = 9 - best compression, most memory