MCPcopy Create free account
hub / github.com/segmentio/encoding / byteArrayCodecOf

Function byteArrayCodecOf

proto/bytes.go:134–144  ·  view source on GitHub ↗
(t reflect.Type, seen map[reflect.Type]*codec)

Source from the content-addressed store, hash-verified

132}
133
134func byteArrayCodecOf(t reflect.Type, seen map[reflect.Type]*codec) *codec {
135 n := t.Len()
136 c := &codec{
137 wire: varlen,
138 size: byteArraySizeFuncOf(n),
139 encode: byteArrayEncodeFuncOf(n),
140 decode: byteArrayDecodeFuncOf(n),
141 }
142 seen[t] = c
143 return c
144}
145
146func byteArraySizeFuncOf(n int) sizeFunc {
147 size := sizeOfVarlen(n)

Callers 1

codecOfFunction · 0.85

Calls 4

byteArraySizeFuncOfFunction · 0.85
byteArrayEncodeFuncOfFunction · 0.85
byteArrayDecodeFuncOfFunction · 0.85
LenMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…