Skip to content

Commit

Permalink
fix: handle multi-member gzip compressed files
Browse files Browse the repository at this point in the history
  • Loading branch information
mbhall88 committed Dec 5, 2024
1 parent 2467dab commit 2412f4a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions liblrge/src/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use std::path::Path;
#[cfg(feature = "bzip2")]
use bzip2::bufread::BzDecoder;
#[cfg(feature = "gzip")]
use flate2::bufread::GzDecoder;
use flate2::bufread::MultiGzDecoder;
#[cfg(feature = "xz")]
use liblzma::read::XzDecoder;
use needletail::parse_fastx_reader;
Expand Down Expand Up @@ -67,7 +67,7 @@ pub(crate) fn open_file<P: AsRef<Path>>(path: P) -> io::Result<Box<dyn Read + Se

let reader: Box<dyn Read + Send> = match compression_format {
#[cfg(feature = "gzip")]
CompressionFormat::Gzip => Box::new(GzDecoder::new(buf)),
CompressionFormat::Gzip => Box::new(MultiGzDecoder::new(buf)),

#[cfg(feature = "zstd")]
CompressionFormat::Zstd => Box::new(ZstdDecoder::new(buf)?),
Expand Down

0 comments on commit 2412f4a

Please sign in to comment.