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)
| 720 | // Data compressed with EncodeAll can be decoded with the Decoder, |
| 721 | // using either a stream or DecodeAll. |
| 722 | func (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 | |
| 731 | func (e *Encoder) encodeAll(enc encoder, src, dst []byte) []byte { |
| 732 | if len(src) == 0 { |