MCPcopy Create free account
hub / github.com/CrowdStrike/csproto / NewDecoder

Function NewDecoder

decoder.go:67–72  ·  view source on GitHub ↗

NewDecoder initializes a new Protobuf decoder to read the provided buffer.

(p []byte)

Source from the content-addressed store, hash-verified

65
66// NewDecoder initializes a new Protobuf decoder to read the provided buffer.
67func NewDecoder(p []byte) *Decoder {
68 return &Decoder{
69 p: p,
70 offset: 0,
71 }
72}
73
74// Mode returns the current decoding mode, safe vs fastest.
75func (d *Decoder) Mode() DecoderMode {

Callers 15

BenchmarkDecodeFixed32Function · 0.92
BenchmarkDecodeFixed64Function · 0.92
TestDecoderSeekFunction · 0.92
TestDecodeBoolFunction · 0.92
TestDecodeStringFunction · 0.92
TestDecodeBytesFunction · 0.92
TestDecodeUInt32Function · 0.92
TestDecodeUInt64Function · 0.92
TestDecodeInt32Function · 0.92
TestDecodeSInt32Function · 0.92

Calls

no outgoing calls

Tested by 15

BenchmarkDecodeFixed32Function · 0.74
BenchmarkDecodeFixed64Function · 0.74
TestDecoderSeekFunction · 0.74
TestDecodeBoolFunction · 0.74
TestDecodeStringFunction · 0.74
TestDecodeBytesFunction · 0.74
TestDecodeUInt32Function · 0.74
TestDecodeUInt64Function · 0.74
TestDecodeInt32Function · 0.74
TestDecodeSInt32Function · 0.74