Module ezstd

Zstd [1] binding for Erlang.

Description

Zstd [1] binding for Erlang.

[1]: http://facebook.github.io/zstd

Data Types

zstd_compression_flag()

zstd_compression_flag() = zstd_c_compression_level | zstd_c_window_log | zstd_c_hash_log | zstd_c_chain_log | zstd_c_search_log | zstd_c_min_match | zstd_c_target_length | zstd_c_strategy

zstd_decompression_flag()

zstd_decompression_flag() = zstd_d_window_log_max

Function Index

compress/1Compresses the given binary.
compress/2Compresses the given binary with compression level.
compress_streaming/2Compress some data without closing out the compression frame.
compress_streaming_end/2
compress_using_cdict/2
create_cdict/2
create_compression_context/1Create a streaming compression context, with a buffer of the given size.
create_ddict/1
create_decompression_context/1Create a streaming decompression context, with a buffer of the given size.
decompress/1Decompresses the given binary.
decompress_streaming/2Compress some data without closing out the compression frame.
decompress_using_ddict/2
get_dict_id_from_cdict/1
get_dict_id_from_ddict/1
get_dict_id_from_frame/1
select_cdict/2Set a dictionary for the given streaming compression context.
select_ddict/2Set a dictionary for the given streaming decompression context.
set_compression_parameter/3Set a compression parameter on the given compression context.
set_decompression_parameter/3Set a decompression parameter on the given compression context.

Function Details

compress/1

compress(Binary::binary()) -> binary() | {error, any()}

Compresses the given binary.

compress/2

compress(Binary::binary(), CompressionLevel::integer()) -> binary() | {error, any()}

Compresses the given binary with compression level.

compress_streaming/2

compress_streaming(Context::reference(), Binary::binary()) -> iolist() | {error, any()}

Compress some data without closing out the compression frame. This is intended to be used by a streaming decompressor which receives the same data in the same order.

compress_streaming_end/2

compress_streaming_end(Context::reference(), Binary::binary()) -> iolist() | {error, any()}

compress_using_cdict/2

compress_using_cdict(Binary::binary(), CCDict::reference()) -> binary() | {error, any()}

create_cdict/2

create_cdict(Binary::binary(), CompressionLevel::integer()) -> reference() | {error, any()}

create_compression_context/1

create_compression_context(BufferSize::pos_integer()) -> reference() | {error, any()}

Create a streaming compression context, with a buffer of the given size.

create_ddict/1

create_ddict(Binary::binary()) -> reference() | {error, any()}

create_decompression_context/1

create_decompression_context(BufferSize::pos_integer()) -> reference() | {error, any()}

Create a streaming decompression context, with a buffer of the given size.

decompress/1

decompress(Binary::binary()) -> binary() | {error, any()}

Decompresses the given binary.

decompress_streaming/2

decompress_streaming(Context::reference(), Binary::binary()) -> iolist() | {error, any()}

Compress some data without closing out the compression frame. This is intended to be used by a streaming decompressor which receives the same data in the same order.

decompress_using_ddict/2

decompress_using_ddict(Binary::binary(), DDict::reference()) -> binary() | {error, any()}

get_dict_id_from_cdict/1

get_dict_id_from_cdict(CDict::reference()) -> integer()

get_dict_id_from_ddict/1

get_dict_id_from_ddict(DDict::reference()) -> integer()

get_dict_id_from_frame/1

get_dict_id_from_frame(Binary::binary()) -> integer()

select_cdict/2

select_cdict(Context::reference(), CDict::reference()) -> ok | {error, any()}

Set a dictionary for the given streaming compression context. Must be called before beginning compression.

select_ddict/2

select_ddict(Context::reference(), DDict::reference()) -> ok | {error, any()}

Set a dictionary for the given streaming decompression context. Must be called before beginning decompression.

set_compression_parameter/3

set_compression_parameter(Context::reference(), Flag::zstd_compression_flag(), Value::integer()) -> ok | {error, any()}

Set a compression parameter on the given compression context. Valid values for flag are zstd_c_compression_level and zstd_c_window_log.

set_decompression_parameter/3

set_decompression_parameter(Context::reference(), Flag::zstd_decompression_flag(), Value::integer()) -> ok | {error, any()}

Set a decompression parameter on the given compression context. The only valid value for Flag is zstd_d_window_log_max.


Generated by EDoc