View Source kpro_compress (kafka_protocol v4.1.6)

Summary

Functions

Translate codec in kafka batch attributes to compression method.
Compress encoded batch.
Decompress batch.
Translate compression method to bits for kafka batch attributes.
Set snappy or lz4 compression modules. This should override the default usage of snappyer and lz4b_frame.

Functions

-spec codec_to_method(byte()) -> kpro:compress_option().
Translate codec in kafka batch attributes to compression method.
-spec compress(kpro:compress_option(), iodata()) -> iodata().
Compress encoded batch.
-spec decompress(kpro:compress_option(), binary()) -> binary().
Decompress batch.
Translate compression method to bits for kafka batch attributes.
-spec provide([{snappy | lz4, module()}]) -> ok.
Set snappy or lz4 compression modules. This should override the default usage of snappyer and lz4b_frame.