MCPcopy Create free account
hub / github.com/Monibuca/engine / Write

Method Write

util/bits/bits.go:91–99  ·  view source on GitHub ↗
(p []byte)

Source from the content-addressed store, hash-verified

89}
90
91func (self *Writer) Write(p []byte) (n int, err error) {
92 for n < len(p) {
93 if err = self.WriteBits64(uint64(p[n]), 8); err != nil {
94 return
95 }
96 n++
97 }
98 return
99}
100
101func (self *Writer) FlushBits() (err error) {
102 if self.n > 0 {

Callers 1

TestBitsFunction · 0.95

Calls 1

WriteBits64Method · 0.95

Tested by 1

TestBitsFunction · 0.76