MCPcopy Index your code
hub / github.com/vmihailenco/msgpack / EncodeBytesLen

Method EncodeBytesLen

encode_slice.go:44–52  ·  view source on GitHub ↗
(l int)

Source from the content-addressed store, hash-verified

42}
43
44func (e *Encoder) EncodeBytesLen(l int) error {
45 if l < 256 {
46 return e.write1(msgpcode.Bin8, uint8(l))
47 }
48 if l <= math.MaxUint16 {
49 return e.write2(msgpcode.Bin16, uint16(l))
50 }
51 return e.write4(msgpcode.Bin32, uint32(l))
52}
53
54func (e *Encoder) encodeStringLen(l int) error {
55 if l < 32 {

Callers 2

EncodeBytesMethod · 0.95
encodeByteArrayValueFunction · 0.80

Calls 3

write1Method · 0.95
write2Method · 0.95
write4Method · 0.95

Tested by

no test coverage detected