package protohelpers
Import Path
github.com/planetscale/vtprotobuf/protohelpers (on go.dev)
Dependency Relation
imports 3 packages, and imported by 5 packages
Involved Source Files
Package protohelpers provides helper functions for encoding and decoding protobuf messages.
The spec can be found at https://protobuf.dev/programming-guides/encoding/.
Package-Level Functions (total 4)
EncodeVarint encodes a uint64 into a varint-encoded byte slice and returns the offset of the encoded value.
The provided offset is the offset after the last byte of the encoded value.
SizeOfVarint returns the size of the varint-encoded value.
SizeOfZigzag returns the size of the zigzag-encoded value.
Skip the first record of the byte slice and return the offset of the next record.
Package-Level Variables (total 3)
ErrIntOverflow is returned when decoding a varint representation of an integer that overflows 64 bits.
ErrInvalidLength is returned when decoding a negative length.
ErrUnexpectedEndOfGroup is returned when decoding a group end without a corresponding group start.
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |