Are *.gz files really compressed into smaller sizes? Because when I open a gzipped file using WinZip, the compression ratio always reads 0%, and after extracting the conctents of a gzipped file and adding up the file sizes, it totals the size of the *.gz file. So where's the compression? Also, which one can give the maximum compression, gzip or bzip?
- Shrikant
p.s:- is it my imagination, or are duels getting rather prolix?
On Fri, 29 Jun 2001, N. Shrikant wrote:
Are *.gz files really compressed into smaller sizes? Because when I
Yes.
open a gzipped file using WinZip, the compression ratio always reads 0%, and after extracting the conctents of a gzipped file and adding up
What kind of files did you compress? gzip only guarantees that the gzipped file will not be larger than the original file. Some files cannot be compressed because they are already compressed.
compression? Also, which one can give the maximum compression, gzip or bzip?
bzip is better in most cases. gzip is better in some cases. bzip does not guarantee that output size will not be larger than input size. I have seen cases where a bzipped file is larger than the input size, and also where it is larger than the corresponding gzip size.
Philip
On Fri, 29 Jun 2001, N. Shrikant wrote:
Are *.gz files really compressed into smaller sizes? Because when I open a gzipped file using WinZip, the compression ratio always reads 0%, and after extracting the conctents of a gzipped file and adding up the file sizes, it totals the size of the *.gz file. So where's the compression? Also, which one can give the maximum compression, gzip or bzip?
try yourself. on linux note the file size before compression. and then then compress it with gzip, bzip2, winzip. and you will find that all these utilities do compress the files. compression you get depends on file format. i found that gzip compresses more for text files while bzip2 was good for binary file compression. i found both gzip and bzip2 better than winzip when it comes to maximum amount of compression.
bye aseem
On Fri, 29 Jun 2001, Aseem wrote:
i found that gzip compresses more for text files while bzip2 was good for binary file compression. i found both gzip and bzip2 better than winzip when it comes to maximum amount of compression.
winzip (zip actually) is similar to compress. both compress and gzip use Lempel-Ziv encoding. Hence, both would provide similar amount of compression. gzip uses LZ77 as opposed to LZ for compress, so there is some difference.
The main difference occurs when compressing multiple files. gzip only compresses a single file, so you have to use tar to join all files first. This creates greater entropy in the final source file, so you get better compression. winzip on the other hand compresses each file and then concatenates them.
bzip2 uses block compression. i won't explain that here.
philip
hey this sounds interesting. i never bothered to know about file compression utilities. just used zip on Windows and tar, gzip on *nix . can you please give me some pointers towards basics of compression techniques.
regards aseem
On Fri, 29 Jun 2001, Philip S Tellis wrote:
winzip (zip actually) is similar to compress. both compress and gzip use Lempel-Ziv encoding. Hence, both would provide similar amount of compression. gzip uses LZ77 as opposed to LZ for compress, so there is some difference.
The main difference occurs when compressing multiple files. gzip only compresses a single file, so you have to use tar to join all files first. This creates greater entropy in the final source file, so you get better compression. winzip on the other hand compresses each file and then concatenates them.
bzip2 uses block compression. i won't explain that here.
On Fri, 29 Jun 2001, Aseem wrote:
can you please give me some pointers towards basics of compression
Come to NCST today at 6:30. There is an ACM seminar on data compression.
Also notice how I put my reply after your post, not before it.
Philip