Documentation ¶
Index ¶
- type Buffer
- func (b *Buffer) Consume(n int) []byte
- func (b *Buffer) Data() []byte
- func (b *Buffer) Has(n int) bool
- func (b *Buffer) Len() int
- func (b *Buffer) Read16() uint16
- func (b *Buffer) Read32() uint32
- func (b *Buffer) Read64() uint64
- func (b *Buffer) Read8() uint8
- func (b *Buffer) ReadBytes(p []byte)
- func (b *Buffer) Remaining() []byte
- func (b *Buffer) Write16(v uint16)
- func (b *Buffer) Write32(v uint32)
- func (b *Buffer) Write64(v uint64)
- func (b *Buffer) Write8(v uint8)
- func (b *Buffer) WriteBytes(p []byte)
- func (b *Buffer) WriteN(n int) []byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Buffer ¶
type Buffer struct {
// contains filtered or unexported fields
}
Buffer encapsulates marshaling unsigned integer and byte slice values.
func (*Buffer) Consume ¶
Consume consumes n bytes from the Buffer. It returns nil if there aren't enough bytes left.
func (*Buffer) Remaining ¶
Remaining consumes and returns a copy of all remaining bytes in the Buffer.
func (*Buffer) WriteBytes ¶
WriteBytes writes p to the Buffer.
Click to show internal directories.
Click to hide internal directories.