MCPcopy Create free account
hub / github.com/cloudwego/dynamicgo / DecodeBytes

Method DecodeBytes

thrift/binary.go:2191–2198  ·  view source on GitHub ↗

DecodeBinary decodes a binary value.

(b []byte)

Source from the content-addressed store, hash-verified

2189
2190// DecodeBinary decodes a binary value.
2191func (d BinaryEncoding) DecodeBytes(b []byte) (value []byte) {
2192 size := d.DecodeInt32(b)
2193 v := (*rt.GoSlice)(unsafe.Pointer(&value))
2194 v.Ptr = rt.IndexPtr(*(*unsafe.Pointer)(unsafe.Pointer(&b)), byteTypeSize, 4)
2195 v.Len = int(size)
2196 v.Cap = int(size)
2197 return
2198}

Callers 1

binaryMethod · 0.45

Calls 2

DecodeInt32Method · 0.95
IndexPtrFunction · 0.92

Tested by

no test coverage detected