Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Types and lengths are encoded as vints, but all of the defined types are below 255 so they're just a single byte. TypeNull = uint8(0) // No-op, no length or value fields TypePadding = uint8(1) // Value must have specified length but may contain anything TypeFragment = uint8(2) // Value contains vint id, vint fragment number, vint total fragments, payload TypeCompressed = uint8(3) // Value is a compressed payload. Use compression magic to identify the algorithm used TypeBytes = uint8(10) // Value is just the bytes TypeString = uint8(11) // Value is just the string, no termination symbol TypePosInt = uint8(12) // Value is vint-encoded TypeNegInt = uint8(13) // Value is vint-encoded )
Variables ¶
This section is empty.
Functions ¶
func EncodeBytes ¶
func EncodeInteger ¶
func EncodeInteger[T constraints.Integer](i T) (z []byte)
func EncodeNull ¶
func EncodeNull() []byte
func EncodePadding ¶
func EncodeString ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.