Encode returns the encoded form of src. The returned slice may be a sub- slice of dst if dst was large enough to hold the entire encoded block. Otherwise, a newly allocated slice will be returned. The dst and src must not overlap. It is valid to pass a nil dst. Encode handles the Snappy block form
(dst, src []byte)
| 18 | // |
| 19 | // Encode handles the Snappy block format, not the Snappy stream format. |
| 20 | func Encode(dst, src []byte) []byte { |
| 21 | return s2.EncodeSnappyBetter(dst, src) |
| 22 | } |
| 23 | |
| 24 | // MaxEncodedLen returns the maximum length of a snappy block, given its |
| 25 | // uncompressed length. |
searching dependent graphs…