Documentation ¶
Index ¶
- func ReadBool(b []byte) (bool, []byte)
- func ReadBytes(b []byte, l uint64) ([]byte, []byte)
- func ReadBytesCopy(b []byte, l uint64) ([]byte, []byte)
- func ReadInt(b []byte) (uint64, []byte)
- func ReadInt32(b []byte) (uint32, []byte)
- func ReadLenPrefixedBytes(b []byte) ([]byte, []byte)
- func WriteBool(b []byte, x bool) []byte
- func WriteBytes(b []byte, data []byte) []byte
- func WriteInt(b []byte, i uint64) []byte
- func WriteInt32(b []byte, i uint32) []byte
- func WriteLenPrefixedBytes(b []byte, bs []byte) []byte
- type Dec
- type Enc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReadBytesCopy ¶ added in v0.4.3
Like ReadBytes, but avoids keeping the source slice [b] alive.
func ReadLenPrefixedBytes ¶ added in v0.5.0
func WriteBytes ¶ added in v0.4.2
Append data to b, returning the new slice.
func WriteInt ¶ added in v0.4.0
WriteInt appends i in little-endian format to b, returning the new slice.
func WriteInt32 ¶ added in v0.6.0
WriteInt32 appends 32-bit integer i in little-endian format to b, returning the new slice.
func WriteLenPrefixedBytes ¶ added in v0.5.0
Types ¶
type Dec ¶
type Dec struct {
// contains filtered or unexported fields
}
Dec is a stateful decoder that returns values encoded sequentially in a single slice.
type Enc ¶
type Enc struct {
// contains filtered or unexported fields
}
Enc is a stateful encoder for a statically-allocated array.
func NewEncFromSlice ¶ added in v0.2.0
Click to show internal directories.
Click to hide internal directories.