3 Chunk Packings
(require (planet murphy/packed-io/chunk)) |
This module provides packings of variable size chunks of data.
3.1 Sizes and Counts
| |||||||||||||||||||||
size : (or/c 1 2 4 8) | |||||||||||||||||||||
packing : packing? | |||||||||||||||||||||
adjustment : 0 |
Limits the size of input that can be consumed by packing,
adding a size bytes long unsigned integer to the packed
representation that determines the size of the following data.
The given adjustment is added to the size of the data packed by packing while packing and subtracted while unpacking.
| |||||||||||||||||||||
size : (or/c 1 2 4 8) | |||||||||||||||||||||
packing : packing? | |||||||||||||||||||||
adjustment : 0 |
Produces a packing for a vector of elements packed using
packing. The length of the vector is stored as a
size bytes long unsigned integer.
The given adjustment is added to the length of the packed vector packing and subtracted while unpacking.
3.2 Blocks of Unlimited Packed Size
Reads all remaining input into a byte string when unpacking and
writes a plain byte string to the output when packing.
Combine this with with-size/p to pack a byte string together with length information.
Reads all remaining input into a string when unpacking and writes a
plain string to the output when packing.
Combine this with with-size/p to pack a string together with length information.
3.3 Derived Types
Reads all remaining input into a string and converts it into a
symbol when unpacking and writes a plain string representation of a
symbol to the output when packing.
Combine this with with-size/p to pack a symbol together with length information.