4 ms·
$ echo "GlooOOooooOOooooOOooooOOooooOOoria" | wc --bytes 35 $ echo "GlooOOooooOOooooOOooooOOooooOOoria" | gzip | wc --bytes 34 Unexpected!
by michaelt 8y ago
$ echo "GlooOOooooOOooooOOooooOOooooOOoria" | wc --bytes
35
$ echo "GlooOOooooOOooooOOooooOOooooOOoria" | gzip | wc --bytes
34
Unexpected!
- W4ldi 8y agoActually not. Zipping itself produces some headers and metadata. Zipping can actually increase filesize. But the effect decreases the bigger the file you're zipping is.
- AnIdiotOnTheNet 8y agoThe raw deflate stream is more in line with expectations: echo "GlooOOooooOOooooOOooooOOooooOOoria" | gzip --no-name | tail --bytes=+11 | head --bytes=-8 | wc --bytes 16