//! Transparent decompression based on magic bytes.
//!
//! Counterpart of Python `gecco._meta.zopen`. The Python version supports
//! gzip, bzip2, xz, and lz4; the Rust port currently handles gzip and
//! returns the file as-is otherwise, which is enough for the formats GECCO
//! actually ships.
use ;
use GzDecoder;
const GZIP_MAGIC: & = &;
/// Open a reader and transparently decompress it if its leading bytes
/// match a supported compression format.
///
/// Returns a boxed reader that yields the decompressed contents (or the
/// original bytes if the stream is not compressed).
/// Open a file at `path` and transparently decompress its contents,
/// mirroring the path-argument form of Python `gecco._meta.zopen`.