(De)/compression¶
Compression and decompression utility classes.
ZStd¶
ZStdCompressor.new()¶
Returns
ZStdCompressorCreate a new compressor using the default compression level of 3
ZStdCompressor.new(level: number)¶
Returns
ZStdCompressorCreate a new compressor using the provided level of compression
ZStdCompressor.new(dict: Bytes)¶
Returns
ZStdCompressorCreate a new compressor using a preassembled ZStd dictionary
zstdcompressor:compress(data: Bytes)¶
Returns
BytesCompresses and returns the given data or nil if an error occurred.
ZStdDecompressor.new()¶
Returns
ZStdDecompressorCreate a new decompressor
ZStdDecompressor.new(dict: Bytes)¶
Returns
ZStdDecompressorCreate a new decompressor using a preassembled ZStd dictionary
zstddecompressor:decompress(data: Bytes)¶
Returns
BytesDecompresses and returns the given data or nil if an error occurred.
ZLib/gz¶
Deflator.gz()¶
Returns
DeflatorCreates a gunzip decompressor with best speed level.
Deflator.zlib()¶
Returns
DeflatorCreates a zlib decompressor with best speed level.
Deflator.raw()¶
Returns
DeflatorCreates a zlib decompressor with best speed level and no header.
deflator:compress(data: Bytes)¶
Returns
BytesCompresses and returns the given data or nil if an error occurred.
Inflator.gz()¶
Returns
InflatorCreates a gunzip decompressor with best speed level.
Inflator.zlib()¶
Returns
InflatorCreates a zlib decompressor with best speed level.
Inflator.auto()¶
Returns
InflatorCreates a zlib decompressor with automagical decompression selection.
Inflator.raw()¶
Returns
InflatorCreates a zlib decompressor with best speed level and no header.
inflator:decompress(data: Bytes)¶
Returns
BytesDecompresses and returns the given data or nil if an error occurred.