MCPcopy Index your code
hub / github.com/ugorji/go / EncodeStringBytesRaw

Method EncodeStringBytesRaw

codec/msgpack.go:377–390  ·  view source on GitHub ↗
(bs []byte)

Source from the content-addressed store, hash-verified

375}
376
377func (e *msgpackEncDriver) EncodeStringBytesRaw(bs []byte) {
378 if bs == nil {
379 e.EncodeNil()
380 return
381 }
382 if e.h.WriteExt {
383 e.writeContainerLen(msgpackContainerBin, len(bs))
384 } else {
385 e.writeContainerLen(msgpackContainerRawLegacy, len(bs))
386 }
387 if len(bs) > 0 {
388 e.e.encWr.writeb(bs)
389 }
390}
391
392func (e *msgpackEncDriver) writeContainerLen(ct msgpackContainerType, l int) {
393 if ct.fixCutoff > 0 && l < int(ct.fixCutoff) {

Callers 1

EncodeExtMethod · 0.95

Calls 3

EncodeNilMethod · 0.95
writeContainerLenMethod · 0.95
writebMethod · 0.65

Tested by

no test coverage detected