encodeBlockBetter encodes a non-empty src to a guaranteed-large-enough dst. It assumes that the varint-encoded length of the decompressed bytes has already been written. It also assumes that: len(dst) >= MaxEncodedLen(len(src))
(dst, src []byte)
| 34 | // |
| 35 | // len(dst) >= MaxEncodedLen(len(src)) |
| 36 | func encodeBlockBetter(dst, src []byte) (d int) { |
| 37 | if len(src) <= 64<<10 { |
| 38 | return encodeBlockBetterGo64K(dst, src) |
| 39 | } |
| 40 | return encodeBlockBetterGo(dst, src) |
| 41 | } |
| 42 | |
| 43 | // encodeBlockBetter encodes a non-empty src to a guaranteed-large-enough dst. It |
| 44 | // assumes that the varint-encoded length of the decompressed bytes has already |
no test coverage detected
searching dependent graphs…