diff --git a/src/gz/bufread.rs b/src/gz/bufread.rs index 25bd74ac..6f7b514b 100644 --- a/src/gz/bufread.rs +++ b/src/gz/bufread.rs @@ -167,8 +167,7 @@ impl Write for GzEncoder { } } -/// A decoder for a single member of a gzip file. Prefer [MultiGzDecoder] for -/// most uses. +/// A decoder for a gzip file with a single member. /// /// This structure consumes a [`BufRead`] interface, reading compressed data /// from the underlying reader, and emitting uncompressed data. @@ -397,11 +396,12 @@ impl Write for GzDecoder { } } -/// A gzip streaming decoder that decodes a complete [gzip file]. +/// A gzip streaming decoder that decodes a [gzip file] with multiple members. /// /// A gzip file consists of a series of "members" concatenated one after another. /// MultiGzDecoder decodes all members of a file, while [GzDecoder] will only decode -/// the first member. MultiGzDecoder is preferable in most cases. +/// the first member. Learn more +/// [in the introduction](https://docs.rs/flate2/*/flate2/#About-multi-member-Gzip-files). /// /// This structure exposes a [`BufRead`] interface that will consume all gzip members /// from the underlying reader and emit uncompressed data. diff --git a/src/gz/read.rs b/src/gz/read.rs index fbd34ccd..aa36ad2c 100644 --- a/src/gz/read.rs +++ b/src/gz/read.rs @@ -90,12 +90,14 @@ impl Write for GzEncoder { } } -/// A decoder for a single member of a gzip file. Prefer [MultiGzDecoder] for -/// most uses. +/// A decoder for a gzip file with a single member. /// /// This structure exposes a [`Read`] interface that will consume compressed /// data from the underlying reader and emit uncompressed data. /// +/// This decoder only handles gzipped data with a single stream. +/// Use [`MultiGzDecoder`] for gzipped data with multiple streams. +/// /// # Examples /// /// ``` @@ -178,11 +180,12 @@ impl Write for GzDecoder { } } -/// A gzip streaming decoder that decodes a full [gzip file]. +/// A gzip streaming decoder that decodes a [gzip file] with multiple members. /// /// A gzip file consists of a series of "members" concatenated one after another. /// MultiGzDecoder decodes all members of a file, while [GzDecoder] will only decode -/// the first member. MultiGzDecoder is preferable in most cases. +/// the first member. Learn more +/// [in the introduction](https://docs.rs/flate2/*/flate2/#About-multi-member-Gzip-files). /// /// This structure exposes a [`Read`] interface that will consume all gzip members /// from the underlying reader and emit uncompressed data. diff --git a/src/gz/write.rs b/src/gz/write.rs index b2b7be5e..d1d309dc 100644 --- a/src/gz/write.rs +++ b/src/gz/write.rs @@ -166,12 +166,14 @@ impl Drop for GzEncoder { } } -/// A decoder for a single member of a gzip file. Prefer [MultiGzDecoder] for -/// most uses. +/// A decoder for a gzip file with a single member. /// /// This structure exposes a [`Write`] interface that will emit uncompressed data /// to the underlying writer `W`. /// +/// This decoder only handles gzipped data with a single stream. +/// Use [`MultiGzDecoder`] for gzipped data with multiple streams. +/// /// [`Write`]: https://doc.rust-lang.org/std/io/trait.Write.html /// /// # Examples @@ -373,11 +375,12 @@ impl Read for GzDecoder { } } -/// A gzip streaming decoder that decodes a full [gzip file]. +/// A gzip streaming decoder that decodes a [gzip file] with multiple members. /// /// A gzip file consists of a series of "members" concatenated one after another. -/// MultiGzDecoder decodes all members of a file, while [GzDecoder] will only decode -/// the first member. MultiGzDecoder is preferable in most cases. +/// `MultiGzDecoder` decodes all members of a file, while [GzDecoder] will only decode +/// the first member. Learn more +/// [in the introduction](https://docs.rs/flate2/*/flate2/#About-multi-member-Gzip-files). /// /// This structure exposes a [`Write`] interface that will consume all gzip members /// from the written buffers and write uncompressed data to the writer. diff --git a/src/lib.rs b/src/lib.rs index 6cbb0063..1413c19e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -133,7 +133,7 @@ pub mod read { /// /// [`Write`]: https://doc.rust-lang.org/std/io/trait.Write.html pub mod write { - pub use crate::deflate::write::DeflateDecoder; + pub use irate::deflate::write::DeflateDecoder; pub use crate::deflate::write::DeflateEncoder; pub use crate::gz::write::GzDecoder; pub use crate::gz::write::GzEncoder;