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)
| 48 | // |
| 49 | // len(dst) >= MaxEncodedLen(len(src)) |
| 50 | func encodeBlockBetterSnappy(dst, src []byte) (d int) { |
| 51 | if len(src) <= 64<<10 { |
| 52 | return encodeBlockBetterSnappyGo64K(dst, src) |
| 53 | } |
| 54 | return encodeBlockBetterSnappyGo(dst, src) |
| 55 | } |
| 56 | |
| 57 | // encodeBlock encodes a non-empty src to a guaranteed-large-enough dst. It |
| 58 | // assumes that the varint-encoded length of the decompressed bytes has already |
no test coverage detected
searching dependent graphs…