package
0.0.0-20241212002435-a4aaf8ca5232
Repository: https://github.com/chrislusf/gleam.git
Documentation: pkg.go.dev
# Functions
CutOne cuts the first encoded value from b.
Decode decodes values from a byte slice generated with EncodeKey or EncodeValue before.
DecodeBytes decodes bytes which is encoded by EncodeBytes before, returns the leftover bytes and decoded value if no error.
DecodeBytesDesc decodes bytes which is encoded by EncodeBytesDesc before, returns the leftover bytes and decoded value if no error.
DecodeCompactBytes decodes bytes which is encoded by EncodeCompactBytes before.
DecodeComparableUvarint decodes mem-comparable uvarint.
DecodeComparableVarint decodes mem-comparable varint.
DecodeDecimal decodes bytes to decimal.
DecodeFloat decodes a float from a byte slice generated with EncodeFloat before.
DecodeFloatDesc decodes a float from a byte slice generated with EncodeFloatDesc before.
DecodeInt decodes value encoded by EncodeInt before.
DecodeIntDesc decodes value encoded by EncodeInt before.
DecodeOne decodes on datum from a byte slice generated with EncodeKey or EncodeValue.
DecodeUint decodes value encoded by EncodeUint before.
DecodeUintDesc decodes value encoded by EncodeInt before.
DecodeUvarint decodes value encoded by EncodeUvarint before.
DecodeVarint decodes value encoded by EncodeVarint before.
EncodeBytes guarantees the encoded value is in ascending order for comparison, encoding with the following rule: [group1][marker1]...[groupN][markerN] group is 8 bytes slice which is padding with 0.
EncodeBytesDesc first encodes bytes using EncodeBytes, then bitwise reverses encoded value to guarantee the encoded value is in descending order for comparison.
EncodeCompactBytes joins bytes with its length into a byte slice.
EncodeComparableUvarint encodes uint64 into mem-comparable bytes.
EncodeComparableVarint encodes an int64 to a mem-comparable bytes.
EncodeDecimal encodes a decimal d into a byte slice which can be sorted lexicographically later.
EncodeFloat encodes a float v into a byte slice which can be sorted lexicographically later.
EncodeFloatDesc encodes a float v into a byte slice which can be sorted lexicographically later.
EncodeInt appends the encoded value to slice b and returns the appended slice.
EncodeIntDesc appends the encoded value to slice b and returns the appended slice.
EncodeKey appends the encoded values to byte slice b, returns the appended slice.
EncodeUint appends the encoded value to slice b and returns the appended slice.
EncodeUintDesc appends the encoded value to slice b and returns the appended slice.
EncodeUvarint appends the encoded value to slice b and returns the appended slice.
EncodeValue appends the encoded values to byte slice b, returning the appended slice.
EncodeVarint appends the encoded value to slice b and returns the appended slice.
# Constants
First byte in the encoded value which specifies the encoding type.