CodecZstd.ZstdCompressor
— MethodZstdCompressor(;level=3)
Create a new zstd compression codec.
Arguments
level
: compression level (1..22)
CodecZstd.ZstdCompressorStream
— MethodZstdCompressorStream(stream::IO; kwargs...)
Create a new zstd compression stream (see ZstdCompressor
for kwargs
).
CodecZstd.ZstdDecompressor
— MethodZstdDecompressor()
Create a new zstd decompression codec.
CodecZstd.ZstdDecompressorStream
— MethodZstdDecompressorStream(stream::IO; kwargs...)
Create a new zstd decompression stream (kwargs
are passed to TranscodingStream
).
CodecZstd.ZstdFrameCompressor
— MethodZstdFrameCompressor(;level=3)
Create a new zstd compression codec that reads the available input and then closes the frame, encoding the decompressed size of that frame.
Arguments
level
: compression level (1..22)
CodecZstd.compress!
— Methodcompress!(cstream::CStream; endOp=:continue)
Compress a Zstandard CStream
. Optionally, provide one one of the following end directives
:continue
- (default) collect more data, encoder decides when to output compressed result, for optimal compression ratio:flush
- flush any data provided so far:end
- flush any remaining data and close current frame
If :end
is provided on the first call to compress!
, the size of the input data will be recorded in the frame header. This is equivalent to calling CodecZstd.LibZstd.ZSTD_compress2
. See also CodecZstd.LibZstd.ZSTD_CCtx_setPledgedSrcSize
.
See the Zstd manual for additional details: https://facebook.github.io/zstd/zstd_manual.html