copyByte copies c at index pos of the internal buffer, growing it if necessary.
(pos int, c byte)
| 122 | |
| 123 | // copyByte copies c at index pos of the internal buffer, growing it if necessary. |
| 124 | func (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 | } |
no outgoing calls