var errIllegalVarint … var errVarintTooLarge … const maxVarintBytes … // encodeUint encodes x as a variable-sized integer into buf and returns the // number of bytes written. buf must be at least maxVarintBytes long func encodeUint(buf []byte, x uint64) (n int) { … } func decodeUintString(s string) (x uint64, size int, err error) { … } func decodeUint(b []byte) (x uint64, size int, err error) { … }