Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/read.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pub struct BzDecoder<R> {

impl<R: Read> BzEncoder<R> {
/// Create a new compression stream which will compress at the given level
/// to read compress output to the give output stream.
/// to read compressed output to the given output stream.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that really there is no output stream here: this is a stream transformer, you give it some r: R that you can read uncompressed data from, and return Self that you can read compressed data from.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for @folkertdev review.

@bjorn3 What do you think about it? 😄

pub fn new(r: R, level: Compression) -> Self {
Self {
inner: bufread::BzEncoder::new(BufReader::new(r), level),
Expand Down
2 changes: 1 addition & 1 deletion src/write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pub struct BzDecoder<W: Write> {

impl<W: Write> BzEncoder<W> {
/// Create a new compression stream which will compress at the given level
/// to write compress output to the give output stream.
/// to write compressed output to the given output stream.
pub fn new(obj: W, level: Compression) -> Self {
Self {
data: Compress::new(level, 30),
Expand Down