View Source ExZstd.DCtx (ex_zstd v0.5.2)
Decompression context. To know more check out the ExZstd
doc.
Summary
Functions
Identical to decompress!
. Wraps the result in a maybe instead of raising.
Decompresses a chunk of data using the given context. If :content_size_unknown
is returned stream decompression can be still attempted.
Identical to decompress_stream
. Wraps the result in a maybe instead of raising.
Decompresses multiple frames with streaming.
Gets the value of a parameter of a decompression context (dparam).
See ExZstd.Dparam
for more information.
Loads a decompression dictionary inside the decompresson context.
Creates a decompression context
Resets the decompression context, interrupting any ongoing decompression and resetting the parameters to their default values.
Sets a parameter of a decompression context (dparam) to the given value.
See ExZstd.Dparam
for more information.
Types
@opaque t()
Functions
@spec decompress(t(), binary()) :: maybe(binary(), ExZstd.decompression_error())
Identical to decompress!
. Wraps the result in a maybe instead of raising.
Note: this functions reads the header to find out the size of the decompressed data. Only feed it trusted input!
Decompresses a chunk of data using the given context. If :content_size_unknown
is returned stream decompression can be still attempted.
Note: this functions reads the header to find out the size of the decompressed data. Only feed it trusted input!
@spec decompress_stream(t(), binary()) :: {:ok, non_neg_integer(), binary()} | {:error, ExZstd.error()}
Identical to decompress_stream
. Wraps the result in a maybe instead of raising.
@spec decompress_stream!(t(), binary()) :: {non_neg_integer(), binary()}
Decompresses multiple frames with streaming.
@spec get_dparam(t(), ExZstd.Dparam.t()) :: integer()
Gets the value of a parameter of a decompression context (dparam).
See ExZstd.Dparam
for more information.
Loads a decompression dictionary inside the decompresson context.
@spec new() :: t()
Creates a decompression context
@spec reset(t(), ExZstd.reset_directive()) :: t()
Resets the decompression context, interrupting any ongoing decompression and resetting the parameters to their default values.
@spec set_dparam(t(), pos_integer(), integer()) :: t()
Sets a parameter of a decompression context (dparam) to the given value.
See ExZstd.Dparam
for more information.