Expand description
Draft-08 data stream header encoding and decoding.
Differences from draft-07:
- Object headers include
extension_count(varint) + raw extension bytes - Separate DatagramStatus type (0x02) for status-only datagrams
- Datagram (0x01) includes extension_count + payload
StructsΒ§
- Datagram
Header - Datagram header with payload (draft-08, type 0x01).
- Datagram
Status Header - Datagram status header (draft-08, type 0x02).
- Fetch
Header - Fetch stream header (follows the stream type varint).
- Fetch
Object Header - Object within a fetch stream (draft-08).
- Object
Header - Object within a subgroup stream (draft-08).
- Subgroup
Header - Subgroup stream header (follows the stream type varint).
EnumsΒ§
- Datagram
- One datagram, of whichever shape its type field names.
- Stream
Type - Every type ID this draftβs data plane assigns, from two separate tables.
FunctionsΒ§
- check_
end_ πof_ track - Refuse an end-of-track object that does not end at object zero.
- check_
extension_ πcount - Refuse an Extension Count that disagrees with the extension bytes beside it.
- count_
extensions π - Count the extension headers in a raw block, or
Noneif the bytes do not tile into whole headers. - datagram_
type_ πerror - Which failure a leading datagram type that is not one a reader wants is.
- encode_
extensions π - Encode extension bytes back to the buffer.
- skip_
extensions π - Skip over extensions in the buffer, reading extension_count varints.
- stream_
type_ πerror - Which failure a leading unidirectional stream type that is not the one a reader wants is.