Documentation
¶
Index ¶
- func Put(b *Bytes)
- type Bytes
- func (bs *Bytes) Bytes() []byte
- func (bs *Bytes) Cap() int
- func (bs *Bytes) EnsureRemaining(atLeast int)
- func (bs *Bytes) Len() int
- func (bs *Bytes) Remaining() int
- func (bs *Bytes) Reset()
- func (bs *Bytes) String() string
- func (bs *Bytes) Write(p []byte) (n int, err error)
- func (bs *Bytes) WriteString(s string) (n int, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Bytes ¶
type Bytes struct {
B []byte
}
Bytes is a simple buffer. It is unsafe, SHOULD not modify existing bytes.
func (*Bytes) EnsureRemaining ¶
EnsureRemaining ensures the buffer has space for at least `atLeast` additional bytes beyond the current length (i.e., remaining capacity). It grows the buffer if necessary using an amortized growth strategy.
Click to show internal directories.
Click to hide internal directories.