MCPcopy Create free account
hub / github.com/chronoxor/FastBinaryEncoding / NewAttached

Function NewAttached

projects/Go/proto/fbe/Buffer.go:33–37  ·  view source on GitHub ↗

Create a buffer with attached bytes memory buffer

(buffer []byte)

Source from the content-addressed store, hash-verified

31
32// Create a buffer with attached bytes memory buffer
33func NewAttached(buffer []byte) *Buffer {
34 result := NewEmptyBuffer()
35 result.Attach(buffer)
36 return result
37}
38
39// Create a buffer with attached bytes memory buffer with offset and size
40func NewAttachedBytes(buffer []byte, offset int, size int) *Buffer {

Callers

nothing calls this directly

Calls 2

NewEmptyBufferFunction · 0.85
AttachMethod · 0.45

Tested by

no test coverage detected