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

Method prefix8

msgp/write.go:235–245  ·  view source on GitHub ↗
(b byte, u uint8)

Source from the content-addressed store, hash-verified

233}
234
235func (mw *Writer) prefix8(b byte, u uint8) error {
236 const need = 2
237 if len(mw.buf)-mw.wloc < need {
238 if err := mw.flush(); err != nil {
239 return err
240 }
241 }
242 prefixu8(mw.buf[mw.wloc:], b, u)
243 mw.wloc += need
244 return nil
245}
246
247func (mw *Writer) prefix16(b byte, u uint16) error {
248 const need = 3

Callers 7

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
prefixu8Function · 0.85

Tested by

no test coverage detected