DetectCompression returns a DecompressorFunc if the input is recognized as a compressed format, nil otherwise. Because it consumes the start of input, other consumers must use the returned io.Reader instead to also read from the beginning.
(input io.Reader)
| 149 | // DetectCompression returns a DecompressorFunc if the input is recognized as a compressed format, nil otherwise. |
| 150 | // Because it consumes the start of input, other consumers must use the returned io.Reader instead to also read from the beginning. |
| 151 | func DetectCompression(input io.Reader) (DecompressorFunc, io.Reader, error) { |
| 152 | _, d, r, e := DetectCompressionFormat(input) |
| 153 | return d, r, e |
| 154 | } |
| 155 | |
| 156 | // AutoDecompress takes a stream and returns an uncompressed version of the |
| 157 | // same stream. |
searching dependent graphs…