Helpers for Kiwi chunk containers with an 8-byte magic and little-endian chunk lengths.
Summary
Functions
Returns one raw chunk from a Kiwi container without parsing later chunks.
Returns the inflated data chunk from a Kiwi container.
Returns the data chunk inflated with a caller-provided inflater.
Parses all chunks from a Kiwi container.
Types
@type parsed() :: %{magic: binary(), version: non_neg_integer(), chunks: [binary()]}
Functions
@spec chunk(binary(), non_neg_integer(), binary()) :: binary()
Returns one raw chunk from a Kiwi container without parsing later chunks.
Chunk indexes are zero-based.
Returns the inflated data chunk from a Kiwi container.
This is useful for callers that only need the payload and want to avoid inflating or decoding the schema chunk.
Returns the data chunk inflated with a caller-provided inflater.
Parses all chunks from a Kiwi container.