From fc30d9e24bffad84eba0d8bcc046e594126398a5 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Sun, 30 Jul 2023 09:29:37 +0200 Subject: [PATCH] remove introductory paragraph that described other tools unrelated to `flate2` --- src/gz/bufread.rs | 4 ++-- src/gz/read.rs | 2 +- src/gz/write.rs | 4 ++-- src/lib.rs | 9 ++------- 4 files changed, 7 insertions(+), 12 deletions(-) diff --git a/src/gz/bufread.rs b/src/gz/bufread.rs index 24634e30..e65c2eb6 100644 --- a/src/gz/bufread.rs +++ b/src/gz/bufread.rs @@ -172,8 +172,8 @@ impl Write for GzEncoder { /// This structure exposes a [`BufRead`] interface, reading compressed data /// from the underlying reader, and emitting uncompressed data. /// -/// After reading a single member of the gzip data this reader will return -/// Ok(0) even if there are more bytes available in the underlying reader. +/// After reading a single member of the gzip data this reader will return +/// Ok(0) even if there are more bytes available in the underlying reader. /// If you need the following bytes, call `into_inner()` after Ok(0) to /// recover the underlying reader. /// diff --git a/src/gz/read.rs b/src/gz/read.rs index 6368509a..2f923731 100644 --- a/src/gz/read.rs +++ b/src/gz/read.rs @@ -98,7 +98,7 @@ impl Write for GzEncoder { /// After reading a single member of the gzip data this reader will return /// Ok(0) even if there are more bytes available in the underlying reader. /// `GzDecoder` may have read additional bytes past the end of the gzip data. -/// If you need the following bytes, wrap the `Reader` in a `std::io::BufReader` +/// If you need the following bytes, wrap the `Reader` in a `std::io::BufReader` /// and use `bufread::GzDecoder` instead. /// /// To handle gzip files that may have multiple members, see [`MultiGzDecoder`] diff --git a/src/gz/write.rs b/src/gz/write.rs index 4184c855..feda221e 100644 --- a/src/gz/write.rs +++ b/src/gz/write.rs @@ -171,8 +171,8 @@ impl Drop for GzEncoder { /// This structure exposes a [`Write`] interface, receiving compressed data and /// writing uncompressed data to the underlying writer. /// -/// After decoding a single member of the gzip data this writer will return the number of bytes up to -/// to the end of the gzip member and subsequent writes will return Ok(0) allowing the caller to +/// After decoding a single member of the gzip data this writer will return the number of bytes up to +/// to the end of the gzip member and subsequent writes will return Ok(0) allowing the caller to /// handle any data following the gzip member. /// /// To handle gzip files that may have multiple members, see [`MultiGzDecoder`] diff --git a/src/lib.rs b/src/lib.rs index 018dc40a..127e2354 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -70,8 +70,8 @@ //! While most `gzip` files one encounters will have a single *member* that can be read //! with the [`GzDecoder`], there may be some files which have multiple members. //! -//! A [`GzDecoder`] will only read the first member of gzip data, which may unexpectedly -//! provide partial results when a multi-member gzip file is encountered. `GzDecoder` is appropriate +//! A [`GzDecoder`] will only read the first member of gzip data, which may unexpectedly +//! provide partial results when a multi-member gzip file is encountered. `GzDecoder` is appropriate //! for data that is designed to be read as single members from a multi-member file. `bufread::GzDecoder` //! and `write::GzDecoder` also allow non-gzip data following gzip data to be handled. //! @@ -81,11 +81,6 @@ //! emit an error after decoding the gzip data. This behavior matches the `gzip`, //! `gunzip`, and `zcat` command line tools. //! -//! Chrome and Firefox appear to implement behavior like `GzDecoder`, ignoring data -//! after the first member. `curl` appears to implement behavior somewhat like -//! `GzDecoder`, only decoding the first member, but emitting an error if there is -//! data after the first member, whether or not it is gzip data. -//! //! [`read`]: read/index.html //! [`bufread`]: bufread/index.html //! [`write`]: write/index.html