On Sun, 25 Jan 2004, Erin S. wrote: > would someone please explain: > aside from the difference in speed, what is the difference between gzip > and bzip2?
gzip is considerably faster, but creates slightly larger files. bzip2 is considerably slower, but creates slightly smaller files. As an example, I zipped 21,056kb of text files. gzip: 25.470s to produce a file of size 6,980kb bzip2: 31.720s to produce a file of size 5,160kb This was with just the default options. I've seen other tests as well (a simple Google search will find you several), and basically the idea is that bzip2 can compress your file(s) smaller, but at a considerable cost of CPU time. If you're compressing lots and lots of stuff, and you want to do it quickly, or you're going to be uncompressing and recompressing the file often, or you're going to be compressing or uncompressing it on a slower computer, you'd probably be better off going with gzip. I don't really agree that "anytime it's available you should use bzip2" ... there are very real tradeoffs. For example, the time it takes me to download the extra 2M of data might not offset the extra time it takes to decompress--in this case, I'm better off going with gzip--unless, of course, disk space is at a premium. I would say, any time you don't care about how much time it takes to compress, and it's available, use bzip2. Otherwise, go with gzip--it's much faster and less CPU intensive. If what you wanted was a technical explanation of the different algorithms behind gzip and bzip2, and the reason they go slower/faster and compress better/not as well, I'm afraid that's outside my realm of expertise! (Very far outside.) Sorry! :-) ~ ross -- This sentence would be seven words long if it were six words shorter. _______________________________________________ newbies mailing list [EMAIL PROTECTED] http://phantom.byu.edu/cgi-bin/mailman/listinfo/newbies
