Kayrock.Compression.Codec behaviour (kayrock v1.0.1)

Copy Markdown View Source

Behaviour for all compression codecs used in Kayrock.

Summary

Callbacks

attr()

@callback attr() :: integer()

available?()

@callback available?() :: boolean()

compress(binary)

@callback compress(binary()) :: binary()

compress(binary, term)

(optional)
@callback compress(binary(), term()) :: binary()

decompress(binary)

@callback decompress(binary()) :: binary()