MCPcopy
hub / github.com/lonng/nano / NewDecoder

Function NewDecoder

internal/codec/codec.go:47–52  ·  view source on GitHub ↗

NewDecoder returns a new decoder that used for decode network bytes slice.

()

Source from the content-addressed store, hash-verified

45
46// NewDecoder returns a new decoder that used for decode network bytes slice.
47func NewDecoder() *Decoder {
48 return &Decoder{
49 buf: bytes.NewBuffer(nil),
50 size: -1,
51 }
52}
53
54func (c *Decoder) forward() error {
55 header := c.buf.Next(HeadLength)

Callers 4

NewConnectorFunction · 0.92
newAgentFunction · 0.92
TestPackFunction · 0.85
BenchmarkDecoder_DecodeFunction · 0.85

Calls

no outgoing calls

Tested by 2

TestPackFunction · 0.68
BenchmarkDecoder_DecodeFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…