MCPcopy Create free account
hub / github.com/AdRoll/baker / copyByte

Method copyByte

pkg/buffercache/compressor.go:124–130  ·  view source on GitHub ↗

copyByte copies c at index pos of the internal buffer, growing it if necessary.

(pos int, c byte)

Source from the content-addressed store, hash-verified

122
123// copyByte copies c at index pos of the internal buffer, growing it if necessary.
124func (d *decompressor) copyByte(pos int, c byte) {
125 dblen := len(d.buf)
126 if pos+1 > dblen {
127 d.buf = append(d.buf, make([]byte, 1+pos-dblen)...)
128 }
129 d.buf[pos] = c
130}

Callers 2

flushBlocksMethod · 0.80

Calls

no outgoing calls

Tested by 1