Documentation ¶
Overview ¶
Package gather implements data structures storing binary data organized in a series of byte slices of fixed size that only gathered together by the user.
Index ¶
- type Bytes
- type WriteBuffer
- func (b *WriteBuffer) Append(data []byte)
- func (b *WriteBuffer) AppendSectionTo(output []byte, offset, size int) []byte
- func (b *WriteBuffer) Bytes() Bytes
- func (b *WriteBuffer) Close()
- func (b *WriteBuffer) GetBytes(output []byte) []byte
- func (b *WriteBuffer) Length() int
- func (b *WriteBuffer) Reset()
- func (b *WriteBuffer) Write(data []byte) (n int, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bytes ¶
type Bytes struct { Slices [][]byte // contains filtered or unexported fields }
Bytes represents a sequence of bytes split into slices.
func (*Bytes) AppendSectionTo ¶
AppendSectionTo appends the section of the buffer to the provided slice and returns it.
type WriteBuffer ¶
type WriteBuffer struct {
// contains filtered or unexported fields
}
WriteBuffer is a write buffer for content of unknown size that manages data in a series of byte slices of uniform size.
func (*WriteBuffer) Append ¶
func (b *WriteBuffer) Append(data []byte)
Append appends the specified slice of bytes to the buffer.
func (*WriteBuffer) AppendSectionTo ¶ added in v0.8.0
func (b *WriteBuffer) AppendSectionTo(output []byte, offset, size int) []byte
AppendSectionTo appends the section of the buffer to the provided slice and returns it.
func (*WriteBuffer) Bytes ¶ added in v0.8.0
func (b *WriteBuffer) Bytes() Bytes
Bytes returns inner gather.Bytes.
func (*WriteBuffer) Close ¶
func (b *WriteBuffer) Close()
Close releases all memory allocated by this buffer.
func (*WriteBuffer) GetBytes ¶ added in v0.8.0
func (b *WriteBuffer) GetBytes(output []byte) []byte
GetBytes appends all bytes to the provided slice and returns it.
func (*WriteBuffer) Length ¶ added in v0.8.0
func (b *WriteBuffer) Length() int
Length returns the combined length of all slices.