Compressing small files with gzip makes its size smaller than with bzip2, why?
1
vote
0
answers
725
views
I have a question, just a little thing couch my eyes
it's about compression with gzip and bzip2:
If I understood correctly - bzip2 requires more processing power but compresses files smaller and more efficient than gzip.
When I tried to compress a 6MB file with bzip2 its size got smaller than with gzip as I expected.
But when I tried to compress a file with a size of 5 bytes with bzip2 its size got larger than with gzip.
5_bytes_file
-b 5_bytes_file.bz2
result: 42 bytes
5_bytes_file
-b 5_bytes_file.gz
result 38 bytes
Why is it happening? am I doing something wrong?
Asked by Karuch
(11 rep)
Aug 9, 2022, 09:27 AM
Last activity: Aug 9, 2022, 09:27 AM
Last activity: Aug 9, 2022, 09:27 AM