Pure helpers for WhatsApp's 3-byte length-prefixed transport frames.
Summary
Functions
Decodes a continuous stream of noise/frame data into distinct payloads.
Returns {extracted_frames, remaining_buffer}.
Encodes a binary payload with a 24-bit length prefix.
Types
Functions
Decodes a continuous stream of noise/frame data into distinct payloads.
Returns {extracted_frames, remaining_buffer}.
@spec encode(binary()) :: {:ok, binary()} | {:error, encode_error()}
Encodes a binary payload with a 24-bit length prefix.