Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

gzip 1.3.5 (winxp) negative ratio on file > 4GB
i used gzip 1.3.5 to zip a 4.2 GB db file for ftp transfer.  now when I:
gzip -l file.gz
i get a negative compression ratio (-946.3%) but the
gzip -t file.gz
comes back with no problems

is this normal for > 4GB files?

Report this thread to moderator Post Follow-up to this message
Old Post
Compy
11-23-04 08:55 PM


Re: gzip 1.3.5 (winxp) negative ratio on file > 4GB
On 23 Nov 2004 08:01:24 -0800, Compy wrote:
> is this normal for > 4GB files?

Yes, since 2^32 = 4294967296. So as long as you don't wanna use a 64bit
machine and/or other custom data types this is normal.

Eric

--
Eric Bodden, ICQ: 12656220, http://www.bodden.de, PGP: BB465582
How to remove incorrectly marked bad secotrs on NTFS...
http://bodden.de/misc/ntfsrecovery/

Report this thread to moderator Post Follow-up to this message
Old Post
Eric Bodden
11-23-04 08:55 PM


Re: gzip 1.3.5 (winxp) negative ratio on file > 4GB
Eric Bodden <newsserver_mails@bodden.de> wrote in message news:<3aujxvp6h0yj.1trq3x4jaznth.
dlg@40tude.net>...
> On 23 Nov 2004 08:01:24 -0800, Compy wrote: 
>
> Yes, since 2^32 = 4294967296. So as long as you don't wanna use a 64bit
> machine and/or other custom data types this is normal.

Actually, this has nothing to do with 64-bit machines or custom data
types.  It has to do with the fact that the gzip format only stores
the low four bytes of the uncompressed file length (i.e. modulo 2^32)
at the end of the gzip file, and so the problem is inescapable
regardless of what data types are used to make the computation.  The
gzip -l command tries to use the length of the gzip file and the
stored uncompressed length to compute the percentage compression.
However there is no way for it to tell, without decompressing the
whole file, what the actual uncompressed length is if it was >= 2^32.

mark

Report this thread to moderator Post Follow-up to this message
Old Post
Mark Adler
11-24-04 08:55 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Compression archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 06:36 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.