const ( MaxLenUvarint63 = 9 MaxValueUvarint63 = (1 << 63) - 1 )View Source
var ( ErrOverflow = errors.New("varints larger than uint63 not supported") ErrUnderflow = errors.New("varints malformed, could not reach the end") ErrNotMinimal = errors.New("varint not minimally encoded") )
FromUvarint reads an unsigned varint from the beginning of buf, returns the varint, and the number of bytes read.
PutUvarint is an alias for binary.PutUvarint.
This is provided for convenience so users of this library can avoid built-in varint functions and easily audit code for uses of those functions.
Make sure that x is smaller or equal to MaxValueUvarint63, otherwise this function will produce values that may be rejected by readers.
ReadUvarint reads a unsigned varint from the given reader.
ToUvarint converts an unsigned integer to a varint-encoded []byte
UvarintSize returns the size (in bytes) of `num` encoded as a unsigned varint.
This may return a size greater than MaxUvarintLen63, which would be an illegal value, and would be rejected by readers.
This section is empty.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4