Algorithm is a compression algorithm that can be used for CompressStream.
| 21 | |
| 22 | // Algorithm is a compression algorithm that can be used for CompressStream. |
| 23 | type Algorithm struct { |
| 24 | name string |
| 25 | baseVariantName string |
| 26 | prefix []byte // Initial bytes of a stream compressed using this algorithm, or empty to disable detection. |
| 27 | decompressor DecompressorFunc |
| 28 | compressor CompressorFunc |
| 29 | } |
| 30 | |
| 31 | // NewAlgorithm creates an Algorithm instance. |
| 32 | // nontrivialBaseVariantName is typically "". |
nothing calls this directly
no outgoing calls
no test coverage detected