View Source ExZstd (ex_zstd v0.3.0)
Elixir bindings to the Zstandard library
Link to this section Summary
Functions
Initialize or re-initialize a Compression Stream using default compression level
Initialize or re-initialize a Compression Stream,
using the compression level specified by level
Create a new Compression Stream
Reset a Compression Stream and start a new compression job, using same parameters from previous job
Reset a Compression Stream and start a new compression job with pledged source size, using same parameters from previous job
Initialize or re-initialize a Decompression Stream
Create a new Decompression Stream
Reset a Decompression Stream and start a new compression job, using same parameters from previous job
Compress a chunk of data with Simple API
Compress a chunk of data with Simple API, using specified compression level
Decompress a chunk of data with Simple API
Compress a chunk of data with Compression Stream
Decompress a chunk of data with Decompression Stream
Flush the Compression Stream, then close it
Link to this section Functions
Initialize or re-initialize a Compression Stream using default compression level
Initialize or re-initialize a Compression Stream,
using the compression level specified by level
@spec cstream_new() :: reference()
Create a new Compression Stream
Reset a Compression Stream and start a new compression job, using same parameters from previous job
@spec cstream_reset(reference(), non_neg_integer()) :: :ok | {:error, :einval | String.t()}
Reset a Compression Stream and start a new compression job with pledged source size, using same parameters from previous job
Initialize or re-initialize a Decompression Stream
@spec dstream_new() :: reference()
Create a new Decompression Stream
Reset a Decompression Stream and start a new compression job, using same parameters from previous job
@spec init() :: :ok
Compress a chunk of data with Simple API
@spec simple_compress(binary(), integer()) :: {:ok, binary()} | {:error, :einval | :enomem | String.t()}
Compress a chunk of data with Simple API, using specified compression level
Decompress a chunk of data with Simple API
@spec stream_compress(reference(), binary()) :: {:ok, binary()} | {:error, :einval | :enomem | String.t()}
Compress a chunk of data with Compression Stream
@spec stream_decompress(reference(), binary()) :: {:ok, binary()} | {:error, :einval | :enomem | String.t()}
Decompress a chunk of data with Decompression Stream
Flush the Compression Stream, then close it