AlgorithmByName returns the compressor by its name
(name string)
| 45 | |
| 46 | // AlgorithmByName returns the compressor by its name |
| 47 | func AlgorithmByName(name string) (Algorithm, error) { |
| 48 | algorithm, ok := compressionAlgorithms[name] |
| 49 | if ok { |
| 50 | return algorithm, nil |
| 51 | } |
| 52 | return Algorithm{}, fmt.Errorf("cannot find compressor for %q", name) |
| 53 | } |
| 54 | |
| 55 | // DecompressorFunc returns the decompressed stream, given a compressed stream. |
| 56 | // The caller must call Close() on the decompressed stream (even if the compressed input stream does not need closing!). |
no outgoing calls
no test coverage detected
searching dependent graphs…