Documentation
¶
Index ¶
- func DecodeZigZag[T constraints.Unsigned](t T) T
- func EncodeZigZag[T constraints.Signed](t T) T
- func MarshalByte(v byte, bs []byte) (n int)
- func MarshalFloat32(v float32, bs []byte) int
- func MarshalFloat64(v float64, bs []byte) int
- func MarshalInt(v int, bs []byte) (n int)
- func MarshalInt16(v int16, bs []byte) (n int)
- func MarshalInt32(v int32, bs []byte) (n int)
- func MarshalInt64(v int64, bs []byte) (n int)
- func MarshalInt8(v int8, bs []byte) (n int)
- func MarshalPositiveInt(v int, bs []byte) (n int)
- func MarshalPositiveInt16(v int16, bs []byte) (n int)
- func MarshalPositiveInt32(v int32, bs []byte) (n int)
- func MarshalPositiveInt64(v int64, bs []byte) (n int)
- func MarshalPositiveInt8(v int8, bs []byte) (n int)
- func MarshalUint(v uint, bs []byte) (n int)
- func MarshalUint16(v uint16, bs []byte) (n int)
- func MarshalUint32(v uint32, bs []byte) (n int)
- func MarshalUint64(v uint64, bs []byte) (n int)
- func MarshalUint8(v uint8, bs []byte) (n int)
- func SizeByte(v byte) (size int)
- func SizeFloat32(v float32) (size int)
- func SizeFloat64(v float64) (size int)
- func SizeInt(v int) (size int)
- func SizeInt16(v int16) (size int)
- func SizeInt32(v int32) int
- func SizeInt64(v int64) int
- func SizeInt8(v int8) (size int)
- func SizePositiveInt(v int) (size int)
- func SizePositiveInt16(v int16) (size int)
- func SizePositiveInt32(v int32) int
- func SizePositiveInt64(v int64) int
- func SizePositiveInt8(v int8) (size int)
- func SizeUint(v uint) (size int)
- func SizeUint16(v uint16) (size int)
- func SizeUint32(v uint32) (size int)
- func SizeUint64(v uint64) (size int)
- func SizeUint8(v uint8) (size int)
- func SkipByte(bs []byte) (n int, err error)
- func SkipFloat32(bs []byte) (n int, err error)
- func SkipFloat64(bs []byte) (n int, err error)
- func SkipInt(bs []byte) (n int, err error)
- func SkipInt16(bs []byte) (n int, err error)
- func SkipInt32(bs []byte) (n int, err error)
- func SkipInt64(bs []byte) (n int, err error)
- func SkipInt8(bs []byte) (n int, err error)
- func SkipPositiveInt(bs []byte) (n int, err error)
- func SkipPositiveInt16(bs []byte) (n int, err error)
- func SkipPositiveInt32(bs []byte) (n int, err error)
- func SkipPositiveInt64(bs []byte) (n int, err error)
- func SkipPositiveInt8(bs []byte) (n int, err error)
- func SkipUint(bs []byte) (n int, err error)
- func SkipUint16(bs []byte) (n int, err error)
- func SkipUint32(bs []byte) (n int, err error)
- func SkipUint64(bs []byte) (n int, err error)
- func SkipUint8(bs []byte) (n int, err error)
- func UnmarshalByte(bs []byte) (v byte, n int, err error)
- func UnmarshalFloat32(bs []byte) (v float32, n int, err error)
- func UnmarshalFloat64(bs []byte) (v float64, n int, err error)
- func UnmarshalInt(bs []byte) (v int, n int, err error)
- func UnmarshalInt16(bs []byte) (v int16, n int, err error)
- func UnmarshalInt32(bs []byte) (v int32, n int, err error)
- func UnmarshalInt64(bs []byte) (v int64, n int, err error)
- func UnmarshalInt8(bs []byte) (v int8, n int, err error)
- func UnmarshalPositiveInt(bs []byte) (v int, n int, err error)
- func UnmarshalPositiveInt16(bs []byte) (v int16, n int, err error)
- func UnmarshalPositiveInt32(bs []byte) (v int32, n int, err error)
- func UnmarshalPositiveInt64(bs []byte) (v int64, n int, err error)
- func UnmarshalPositiveInt8(bs []byte) (v int8, n int, err error)
- func UnmarshalUint(bs []byte) (v uint, n int, err error)
- func UnmarshalUint16(bs []byte) (v uint16, n int, err error)
- func UnmarshalUint32(bs []byte) (v uint32, n int, err error)
- func UnmarshalUint64(bs []byte) (v uint64, n int, err error)
- func UnmarshalUint8(bs []byte) (v uint8, n int, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeZigZag ¶
func DecodeZigZag[T constraints.Unsigned](t T) T
func EncodeZigZag ¶
func EncodeZigZag[T constraints.Signed](t T) T
func MarshalByte ¶
MarshalByte fills bs with an encoded (Varint) byte value.
Returns the number of used bytes. It will panic if receives too small bs.
func MarshalFloat32 ¶
MarshalFloat32 fills bs with an encoded (Varint) float32 value.
Returns the number of used bytes. It will panic if receives too small bs.
func MarshalFloat64 ¶
MarshalFloat64 fills bs with an encoded (Varint) float64 value.
Returns the number of used bytes. It will panic if receives too small bs.
func MarshalInt ¶
MarshalInt fills bs with an encoded (Varint) int value.
Returns the number of used bytes. It will panic if receives too small bs.
func MarshalInt16 ¶
MarshalInt16 fills bs with an encoded (Varint) int16 value.
Returns the number of used bytes. It will panic if receives too small bs.
func MarshalInt32 ¶
MarshalInt32 fills bs with an encoded (Varint) int32 value.
Returns the number of used bytes. It will panic if receives too small bs.
func MarshalInt64 ¶
MarshalInt64 fills bs with an encoded (Varint) int64 value.
Returns the number of used bytes. It will panic if receives too small bs.
func MarshalInt8 ¶
MarshalInt8 fills bs with an encoded (Varint) int8 value.
Returns the number of used bytes. It will panic if receives too small bs.
func MarshalPositiveInt ¶ added in v0.2.4
MarshalPositiveInt fills bs with an encoded (Varint) int value. It should be used with positive values, like string length (does not use ZigZag).
Returns the number of used bytes. It will panic if receives too small bs.
func MarshalPositiveInt16 ¶ added in v0.2.4
MarshalPositiveInt16 fills bs with an encoded (Varint) int16 value. It should be used with positive values, like string length (does not use ZigZag).
Returns the number of used bytes. It will panic if receives too small bs.
func MarshalPositiveInt32 ¶ added in v0.2.4
MarshalPositiveInt32 fills bs with an encoded (Varint) int32 value. It should be used with positive values, like string length (does not use ZigZag).
Returns the number of used bytes. It will panic if receives too small bs.
func MarshalPositiveInt64 ¶ added in v0.2.4
MarshalPositiveInt64 fills bs with an encoded (Varint) int64 value. It should be used with positive values, like string length (does not use ZigZag).
Returns the number of used bytes. It will panic if receives too small bs.
func MarshalPositiveInt8 ¶ added in v0.2.4
MarshalPositiveInt8 fills bs with an encoded (Varint) int8 value. It should be used with positive values, like string length (does not use ZigZag).
Returns the number of used bytes. It will panic if receives too small bs.
func MarshalUint ¶
MarshalUint fills bs with an encoded (Varint) uint value.
Returns the number of used bytes. It will panic if receives too small bs.
func MarshalUint16 ¶
MarshalUint16 fills bs with an encoded (Varint) uint16 value.
Returns the number of used bytes. It will panic if receives too small bs.
func MarshalUint32 ¶
MarshalUint32 fills bs with an encoded (Varint) uint32 value.
Returns the number of used bytes. It will panic if receives too small bs.
func MarshalUint64 ¶
MarshalUint64 fills bs with an encoded (Varint) uint64 value.
Returns the number of used bytes. It will panic if receives too small bs.
func MarshalUint8 ¶
MarshalUint8 fills bs with an encoded (Varint) uint8 value.
Returns the number of used bytes. It will panic if receives too small bs.
func SizeFloat32 ¶
SizeFloat32 returns the size of an encoded (Varint) float32 value.
func SizeFloat64 ¶
SizeFloat64 returns the size of an encoded (Varint) float64 value.
func SizePositiveInt ¶ added in v0.2.4
SizePositiveInt returns the size of an encoded (Varint) int value. It should be used with positive values, like string length (does not use ZigZag).
func SizePositiveInt16 ¶ added in v0.2.4
SizePositiveInt16 returns the size of an encoded (Varint) int16 value. It should be used with positive values, like string length (does not use ZigZag).
func SizePositiveInt32 ¶ added in v0.2.4
SizePositiveInt32 returns the size of an encoded (Varint) int32 value. It should be used with positive values, like string length (does not use ZigZag).
func SizePositiveInt64 ¶ added in v0.2.4
SizePositiveInt64 returns the size of an encoded (Varint) int64 value. It should be used with positive values, like string length (does not use ZigZag).
func SizePositiveInt8 ¶ added in v0.2.4
SizePositiveInt8 returns the size of an encoded (Varint) int8 value. It should be used with positive values, like string length (does not use ZigZag).
func SizeUint16 ¶
SizeUint16 returns the size of an encoded uint16 value.
func SizeUint32 ¶
SizeUint32 returns the size of an encoded uint32 value.
func SizeUint64 ¶
SizeUint64 returns the size of an encoded uint64 value.
func SkipByte ¶
SkipByte skips an encoded (Varint) byte.
In addition to the number of skipped bytes, it may also return mus.ErrTooSmallByteSlice or com.ErrOverflow.
func SkipFloat32 ¶
SkipFloat32 skips an encoded (Varint) float32 value.
In addition to the number of skipped bytes, it may also return mus.ErrTooSmallByteSlice or com.ErrOverflow.
func SkipFloat64 ¶
SkipFloat64 skips an encoded (Varint) float64 value.
In addition to the number of skipped bytes, it may also return mus.ErrTooSmallByteSlice or com.ErrOverflow.
func SkipInt ¶
SkipInt skips an encoded (Varint) int value.
In addition to the number of skipped bytes, it may also return mus.ErrTooSmallByteSlice or com.ErrOverflow.
func SkipInt16 ¶
SkipInt16 skips an encoded (Varint) int16 value.
In addition to the number of skipped bytes, it may also return mus.ErrTooSmallByteSlice or com.ErrOverflow.
func SkipInt32 ¶
SkipInt32 skips an encoded (Varint) int32 value.
In addition to the number of skipped bytes, it may also return mus.ErrTooSmallByteSlice or com.ErrOverflow.
func SkipInt64 ¶
SkipInt64 skips an encoded (Varint) int64 value.
In addition to the number of skipped bytes, it may also return mus.ErrTooSmallByteSlice or com.ErrOverflow.
func SkipInt8 ¶
SkipInt8 skips an encoded (Varint) int8 value.
In addition to the number of skipped bytes, it may also return mus.ErrTooSmallByteSlice or com.ErrOverflow.
func SkipPositiveInt ¶ added in v0.2.4
SkipPositiveInt skips an encoded (Varint) int value. It should be used with positive values, like string length (does not use ZigZag).
In addition to the number of skipped bytes, it may also return mus.ErrTooSmallByteSlice or com.ErrOverflow.
func SkipPositiveInt16 ¶ added in v0.2.4
SkipPositiveInt16 skips an encoded (Varint) int16 value. It should be used with positive values, like string length (does not use ZigZag).
In addition to the number of skipped bytes, it may also return mus.ErrTooSmallByteSlice or com.ErrOverflow.
func SkipPositiveInt32 ¶ added in v0.2.4
SkipPositiveInt32 skips an encoded (Varint) int32 value. It should be used with positive values, like string length (does not use ZigZag).
In addition to the number of skipped bytes, it may also return mus.ErrTooSmallByteSlice or com.ErrOverflow.
func SkipPositiveInt64 ¶ added in v0.2.4
SkipPositiveInt64 skips an encoded (Varint) int64 value. It should be used with positive values, like string length (does not use ZigZag).
In addition to the number of skipped bytes, it may also return mus.ErrTooSmallByteSlice or com.ErrOverflow.
func SkipPositiveInt8 ¶ added in v0.2.4
SkipPositiveInt8 skips an encoded (Varint) int8 value. It should be used with positive values, like string length (does not use ZigZag).
In addition to the number of skipped bytes, it may also return mus.ErrTooSmallByteSlice or com.ErrOverflow.
func SkipUint ¶
SkipUint skips an encoded uint.
In addition to the number of skipped bytes, it may also return mus.ErrTooSmallByteSlice or com.ErrOverflow.
func SkipUint16 ¶
SkipUint16 skips an encoded uint16.
In addition to the number of skipped bytes, it may also return mus.ErrTooSmallByteSlice or com.ErrOverflow.
func SkipUint32 ¶
SkipUint32 skips an encoded uint32.
In addition to the number of skipped bytes, it may also return mus.ErrTooSmallByteSlice or com.ErrOverflow.
func SkipUint64 ¶
SkipUint64 skips an encoded uint64.
In addition to the number of skipped bytes, it may also return mus.ErrTooSmallByteSlice or com.ErrOverflow.
func SkipUint8 ¶
SkipUint8 skips an encoded uint8.
In addition to the number of skipped bytes, it may also return mus.ErrTooSmallByteSlice or com.ErrOverflow.
func UnmarshalByte ¶
UnmarshalByte parses an encoded (Varint) byte value from bs.
In addition to the byte value and the number of used bytes, it may also return mus.ErrTooSmallByteSlice or com.ErrOverflow.
func UnmarshalFloat32 ¶
UnmarshalFloat32 parses an encoded (Varint) float32 value from bs.
In addition to the float32 value and the number of used bytes, it may also return mus.ErrTooSmallByteSlice or com.ErrOverflow.
func UnmarshalFloat64 ¶
UnmarshalFloat64 parses an encoded (Varint) float64 value from bs.
In addition to the float64 value and the number of used bytes, it may also return mus.ErrTooSmallByteSlice or com.ErrOverflow.
func UnmarshalInt ¶
UnmarshalInt parses an encoded (Varint) int value from bs.
In addition to the int value and the number of used bytes, it may also return mus.ErrTooSmallByteSlice or com.ErrOverflow.
func UnmarshalInt16 ¶
UnmarshalInt16 parses an encoded (Varint) int16 value from bs.
In addition to the int16 value and the number of used bytes, it may also return mus.ErrTooSmallByteSlice or com.ErrOverflow.
func UnmarshalInt32 ¶
UnmarshalInt32 parses an encoded (Varint) int32 value from bs.
In addition to the int32 value and the number of used bytes, it may also return mus.ErrTooSmallByteSlice or com.ErrOverflow.
func UnmarshalInt64 ¶
UnmarshalInt64 parses an encoded (Varint) int64 value from bs.
In addition to the int64 value and the number of used bytes, it may also return mus.ErrTooSmallByteSlice or com.ErrOverflow.
func UnmarshalInt8 ¶
UnmarshalInt8 parses an encoded (Varint) int8 value from bs.
In addition to the int8 value and the number of used bytes, it may also return mus.ErrTooSmallByteSlice or com.ErrOverflow.
func UnmarshalPositiveInt ¶ added in v0.2.4
UnmarshalPositiveInt parses an encoded (Varint) int value from bs. It should be used with positive values, like string length (does not use ZigZag).
In addition to the int value and the number of used bytes, it may also return mus.ErrTooSmallByteSlice or com.ErrOverflow.
func UnmarshalPositiveInt16 ¶ added in v0.2.4
UnmarshalPositiveInt16 parses an encoded (Varint) int16 value from bs. It should be used with positive values, like string length (does not use ZigZag).
In addition to the int16 value and the number of used bytes, it may also return mus.ErrTooSmallByteSlice or com.ErrOverflow.
func UnmarshalPositiveInt32 ¶ added in v0.2.4
UnmarshalPositiveInt32 parses an encoded (Varint) int32 value from bs. It should be used with positive values, like string length (does not use ZigZag).
In addition to the int32 value and the number of used bytes, it may also return mus.ErrTooSmallByteSlice or com.ErrOverflow.
func UnmarshalPositiveInt64 ¶ added in v0.2.4
UnmarshalPositiveInt64 parses an encoded (Varint) int64 value from bs. It should be used with positive values, like string length (does not use ZigZag).
In addition to the int64 value and the number of used bytes, it may also return mus.ErrTooSmallByteSlice or com.ErrOverflow.
func UnmarshalPositiveInt8 ¶ added in v0.2.4
UnmarshalPositiveInt8 parses an encoded (Varint) int8 value from bs. It should be used with positive values, like string length (does not use ZigZag).
In addition to the int8 value and the number of used bytes, it may also return mus.ErrTooSmallByteSlice or com.ErrOverflow.
func UnmarshalUint ¶
UnmarshalUint parses an encoded (Varint) uint value from bs.
In addition to the uint value and the number of used bytes, it may also return mus.ErrTooSmallByteSlice or com.ErrOverflow.
func UnmarshalUint16 ¶
UnmarshalUint16 parses an encoded (Varint) uint16 value from bs.
In addition to the uint16 value and the number of used bytes, it may also return mus.ErrTooSmallByteSlice or com.ErrOverflow.
func UnmarshalUint32 ¶
UnmarshalUint32 parses an encoded (Varint) uint32 value from bs.
In addition to the uint32 value and the number of used bytes, it may also return mus.ErrTooSmallByteSlice or com.ErrOverflow.
func UnmarshalUint64 ¶
UnmarshalUint64 parses an encoded (Varint) uint64 value from bs.
In addition to the uint64 value and the number of used bytes, it may also return mus.ErrTooSmallByteSlice or com.ErrOverflow.
Types ¶
This section is empty.