Open funny-falcon opened 4 days ago
It was broken at 9395f6176b4e876ec5685bff58c65482191ca29a
What other output did you expect?
Note that the round-trip still works as expected:
$ echo "This is a simple example" | cargo run -q --features=binary | cargo run -q --features=binary -- -d | hd
00000000 54 68 69 73 20 69 73 20 61 20 73 69 6d 70 6c 65 |This is a simple|
00000010 20 65 78 61 6d 70 6c 65 0a | example.|
00000019
$
I've expected result from README:
$ echo "This is a simple example" | cargo run -q | hd
00000000 54 a8 8c 60 41 3c 1a c5 6d a5 c0 c5 a3 87 fc 05 |T..`A<..m.......|
00000010 ad a8 74 c2 a2 |..t..|
00000015
If not exact match, I at least expected "compression" result is not twice larger than plain text.
That is indeed a problem o.O
Oh geez, what a silly bug:
- decompress8(r, w).unwrap();
+ compress(flavor, r, w).unwrap()
Compression and decompression is swapped :D