You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello everyone, I'm an absolute beginner who's trying to learn Rust by coding some basic programs. I'm currently writing a utility that compresses or decompresses from the input stream and writes the result on the output stream. I use flate2 to handle the compression and decompression.
Unfortunately, I'm running into the following error when trying to decompress:
Error occurred while reading stdin: corrupt deflate stream
Printed by line 28 from my code (see below).
Any idea on what's causing it? I think I might be misunderstanding the usage of ZlibDecoder.
To reproduce the error, run:
cargo b
cat Cargo.toml | ./target/debug/compressor c | ./target/debug/compressor d
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello everyone, I'm an absolute beginner who's trying to learn Rust by coding some basic programs. I'm currently writing a utility that compresses or decompresses from the input stream and writes the result on the output stream. I use flate2 to handle the compression and decompression.
Unfortunately, I'm running into the following error when trying to decompress:
Printed by line 28 from my code (see below).
Any idea on what's causing it? I think I might be misunderstanding the usage of ZlibDecoder.
To reproduce the error, run:
Here's my main.rs:
and Cargo.toml
Beta Was this translation helpful? Give feedback.
All reactions