MCPcopy
hub / github.com/tinylib/msgp / prefix16

Method prefix16

msgp/write.go:247–257  ·  view source on GitHub ↗
(b byte, u uint16)

Source from the content-addressed store, hash-verified

245}
246
247func (mw *Writer) prefix16(b byte, u uint16) error {
248 const need = 3
249 if len(mw.buf)-mw.wloc < need {
250 if err := mw.flush(); err != nil {
251 return err
252 }
253 }
254 prefixu16(mw.buf[mw.wloc:], b, u)
255 mw.wloc += need
256 return nil
257}
258
259func (mw *Writer) prefix32(b byte, u uint32) error {
260 const need = 5

Callers 9

WriteMapHeaderMethod · 0.95
WriteArrayHeaderMethod · 0.95
WriteInt64Method · 0.95
WriteUint64Method · 0.95
WriteBytesMethod · 0.95
WriteBytesHeaderMethod · 0.95
WriteStringMethod · 0.95
WriteStringHeaderMethod · 0.95
WriteStringFromBytesMethod · 0.95

Calls 2

flushMethod · 0.95
prefixu16Function · 0.85

Tested by

no test coverage detected