Bzip2

Associate
Joined
1 Aug 2003
Posts
1,053
I wanted to tar and compress a directory, the tar was no problem, but the compression made no difference to the file size.

I ran bzip2 -zk9 [file]

As I understand it, z forces compression, k keeps the original file and 9 tells it to use maximum compression.

Please tell me how wrong I am...
 
What type of content were you compressing? If it's JPEGs, MP3s or something that's already compressed, the file size difference will be minimal.
 
It's a selection of varying files from word docs to pictures but whilst there would be minimal difference between compressed pictures and non-compressed, there should be at least SOME difference over 1.2GB with maximum bzip2 compression I would have thought.
 
If you're tarring up a directory, do it all as one step:

For gzip:
tar cvvzpf file.tar.gz directory

For bzip switch the z for a j
tar cvvjpf file.tar.bz2 directory
 
Back
Top Bottom