MCPcopy Create free account
hub / github.com/valyala/bytebufferpool / ByteBuffer

Struct ByteBuffer

bytebuffer.go:12–17  ·  view source on GitHub ↗

ByteBuffer provides byte buffer, which can be used for minimizing memory allocations. ByteBuffer may be used with functions appending data to the given []byte slice. See example code for details. Use Get for obtaining an empty byte buffer.

Source from the content-addressed store, hash-verified

10//
11// Use Get for obtaining an empty byte buffer.
12type ByteBuffer struct {
13
14 // B is a byte buffer to use in append-like workloads.
15 // See example code for details.
16 B []byte
17}
18
19// Len returns the size of the byte buffer.
20func (b *ByteBuffer) Len() int {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected