Documentation
¶
Index ¶
- func DecodeVarint(buf []byte) (x uint64)
- func DecodeVarint2(buf []byte) (x uint64, n int)
- func EncodeVarint(x uint64) []byte
- func Key(x byte) (byte, byte)
- func ReadInt32(buf []byte) int32
- func ReadInt64(bytes []byte) int64
- func ReadUInt32(buf []byte) uint32
- func ReadUint64(bytes []byte) uint64
- func Round(val float64, roundOn float64, places int) (newVal float64)
- type PBF
- func (pbf *PBF) Byte()
- func (pbf *PBF) ReadBool() bool
- func (pbf *PBF) ReadDouble() float64
- func (pbf *PBF) ReadFixed32() uint32
- func (pbf *PBF) ReadFixed64() uint64
- func (pbf *PBF) ReadFloat() float32
- func (pbf *PBF) ReadInt32() int32
- func (pbf *PBF) ReadInt64() int64
- func (pbf *PBF) ReadKey() (byte, byte)
- func (pbf *PBF) ReadPacked() []uint32
- func (pbf *PBF) ReadPackedInt32() []int32
- func (pbf *PBF) ReadPackedUInt32() []uint32
- func (pbf *PBF) ReadPackedUInt32_2() []uint32
- func (pbf *PBF) ReadPackedUInt32_3() []uint32
- func (pbf *PBF) ReadPackedUInt64() []int
- func (pbf *PBF) ReadSFixed32() int32
- func (pbf *PBF) ReadSFixed64() int64
- func (pbf *PBF) ReadSVarint() float64
- func (pbf *PBF) ReadSVarintPower() float64
- func (pbf *PBF) ReadString() string
- func (pbf *PBF) ReadUInt32() uint32
- func (pbf *PBF) ReadUInt64() uint64
- func (pbf *PBF) ReadUInt322() uint32
- func (pbf *PBF) ReadVarint() int
- func (pbf *PBF) ReadVarint2() int
- func (pbf *PBF) Varint() []byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeVarint ¶
func DecodeVarint2 ¶
DecodeVarint reads a varint-encoded integer from the slice. It returns the integer and the number of bytes consumed, or zero if there is not enough. This is the format for the int32, int64, uint32, uint64, bool, and enum protocol buffer types.
func EncodeVarint ¶
EncodeVarint returns the varint encoding of x. This is the format for the int32, int64, uint32, uint64, bool, and enum protocol buffer types. Not used by the package itself, but helpful to clients wishing to use the same encoding.
func Key ¶
a much faster key integration (microseconds to nanoseconds) returns the value number and key number for a given byte
func ReadUInt32 ¶
Types ¶
type PBF ¶
the structure used for implementing a custom reader
func (*PBF) ReadDouble ¶
func (*PBF) ReadFixed32 ¶
func (*PBF) ReadPacked ¶
an unused implemenation of readuint32
func (*PBF) ReadPackedInt32 ¶
small function to read a packed set of int32 tags
func (*PBF) ReadPackedUInt32 ¶
an old read packed uint32 impelementation
func (*PBF) ReadPackedUInt32_2 ¶
the current readpacked uint32 implemenation
func (*PBF) ReadPackedUInt32_3 ¶
an attempted readpackeduint implementation
func (*PBF) ReadPackedUInt64 ¶
small function to read a packed set of integers
func (*PBF) ReadSFixed32 ¶
func (*PBF) ReadSVarintPower ¶
read s varint with geobuf deltas