Common Lisp Package: WIRE-FORMAT

Wire format for protocol buffers.

README:

FUNCTION

Public

READ-DOUBLE-FLOAT-CAREFULLY (BUFFER INDEX LIMIT)

Read a DOUBLE-FLOAT from BUFFER starting at INDEX. The float is stored in BUFFER as an 8-octet little-endian IEEE double precision value. Both the float and the index of the first octet following it are returned. If reading the float would require octets beyond LIMIT, then signal PARSE-OVERFLOW.

READ-SINGLE-FLOAT-CAREFULLY (BUFFER INDEX LIMIT)

Read a SINGLE-FLOAT from BUFFER starting at INDEX. The float is stored in BUFFER as a 4-octet little-endian IEEE single precision value. Both the float and the index of the first octet following it are returned. If reading the float would require octets beyond LIMIT, then signal PARSE-OVERFLOW.

WRITE-DOUBLE-FLOAT-CAREFULLY (BUFFER INDEX LIMIT FLOAT)

Write the little-endian IEEE binary representation of single precision FLOAT to BUFFER starting at INDEX. Return the index value of the first octet following FLOAT. If encoding FLOAT requires space in BUFFER past LIMIT, then signal ENCODE-OVERFLOW.

WRITE-SINGLE-FLOAT-CAREFULLY (BUFFER INDEX LIMIT FLOAT)

Write the little-endian IEEE binary representation of double precision FLOAT to BUFFER starting at INDEX. Return the index value of the first octet following FLOAT. If encoding FLOAT requires space in BUFFER past LIMIT, then signal ENCODE-OVERFLOW.

Undocumented

READ-BOOLEAN-CAREFULLY (BUFFER INDEX LIMIT)

READ-INT32-CAREFULLY (BUFFER INDEX LIMIT)

READ-INT64-CAREFULLY (BUFFER INDEX LIMIT)

READ-OCTETS-CAREFULLY (BUFFER INDEX LIMIT)

READ-UINT32 (BUFFER INDEX)

READ-UINT32-CAREFULLY (BUFFER INDEX LIMIT)

READ-UINT64-CAREFULLY (BUFFER INDEX LIMIT)

SKIP-FIELD (BUFFER INDEX LIMIT START-TAG)

WRITE-BOOLEAN-CAREFULLY (BUFFER INDEX LIMIT VALUE)

WRITE-INT32-CAREFULLY (BUFFER INDEX LIMIT VALUE)

WRITE-INT64-CAREFULLY (BUFFER INDEX LIMIT VALUE)

WRITE-OCTETS-CAREFULLY (BUFFER INDEX LIMIT OCTETS)

WRITE-UINT32 (BUFFER INDEX VALUE)

WRITE-UINT32-CAREFULLY (BUFFER INDEX LIMIT VALUE)

WRITE-UINT64-CAREFULLY (BUFFER INDEX LIMIT VALUE)

ZIG-ZAG-DECODE32 (V)

ZIG-ZAG-DECODE64 (V)

ZIG-ZAG-ENCODE32 (V)

ZIG-ZAG-ENCODE64 (V)

CONDITION

Public

ALIGNMENT

Bad data encountered while skipping a field.

BUFFER-OVERFLOW

Buffer space exhausted while encoding a value.

DATA-EXHAUSTED

Decoding a value requires more data than is available.

ENCODING-ERROR

Superclass of conditions signalled while encoding values.

PARSING-ERROR

Superclass of conditions signalled while decoding values.

PROTOCOL-ERROR

Superclass of all PROTOCOL-BUFFER conditions.

VALUE-OUT-OF-RANGE

Value decoded is outside the range of the return type.

CONSTANT

Private

+END-GROUP+

Wire type marking the end of a group.

+FIXED32+

Wire type used for 4-byte integers or single precision floats.

+FIXED64+

Wire type used for 8-byte integers or double precision floats.

+LENGTH-DELIMITED+

Wire type used for length delimited values, such as character strings.

+START-GROUP+

Wire type marking the start of a group.

+VARINT+

Wire type used for variable length integers.