MCPcopy Index your code
hub / github.com/klauspost/compress / EncodeAll

Method EncodeAll

zstd/encoder.go:722–729  ·  view source on GitHub ↗

EncodeAll will encode all input in src and append it to dst. This function can be called concurrently, but each call will only run on a single goroutine. If empty input is given, nothing is returned, unless WithZeroFrames is specified. Encoded blocks can be concatenated and the result will be the co

(src, dst []byte)

Source from the content-addressed store, hash-verified

720// Data compressed with EncodeAll can be decoded with the Decoder,
721// using either a stream or DecodeAll.
722func (e *Encoder) EncodeAll(src, dst []byte) []byte {
723 e.init.Do(e.initialize)
724 enc := <-e.encoders
725 defer func() {
726 e.encoders <- enc
727 }()
728 return e.encodeAll(enc, src, dst)
729}
730
731func (e *Encoder) encodeAll(enc encoder, src, dst []byte) []byte {
732 if len(src) == 0 {

Callers 15

TestDecoder_ResetFunction · 0.95
TestWriterMemUsageFunction · 0.95
FuzzEncodingFunction · 0.80
TestEncoder_SmallDictFunction · 0.80
EncodeToFunction · 0.80

Calls 1

encodeAllMethod · 0.95

Tested by 15

TestDecoder_ResetFunction · 0.76
TestWriterMemUsageFunction · 0.76
FuzzEncodingFunction · 0.64
TestEncoder_SmallDictFunction · 0.64