Compressor is an interface for compressing data. An instance is associated with a specific Setting.
| 73 | // Compressor is an interface for compressing data. An instance is associated |
| 74 | // with a specific Setting. |
| 75 | type Compressor interface { |
| 76 | // Compress a block, appending the compressed data to dst[:0]. |
| 77 | // Returns setting used. |
| 78 | Compress(dst, src []byte) ([]byte, Setting) |
| 79 | |
| 80 | // Close must be called when the Compressor is no longer needed. |
| 81 | // After Close is called, the Compressor must not be used again. |
| 82 | Close() |
| 83 | } |
| 84 | |
| 85 | func GetCompressor(s Setting) Compressor { |
| 86 | switch s.Algorithm { |
no outgoing calls
no test coverage detected
searching dependent graphs…