gzip GB file limit

Dan Nelson dnelson at allantgroup.com
Wed Feb 25 09:24:14 PST 2004


In the last episode (Feb 25), Mike Schroll said:
> I recently backed up my data before blowing away a partition with
> tar -cvf - /docs |gzip -> /docs.tgz
> -- it went through fine, no errors.
> 
> I've now discovered that the gzip which ships with FreeBSD 5.x base,
> 1.2.4 has a 2GB or 4GB file size limit on the file it creates...
> the file created by that command was 4.9GB,
> now when I extract it I get
> gzip: docs.tgz: invalid compressed data--format violated

It must have gotten corrupted somewhere else.  gzip has been
largefile-safe for years.  The header will has a 32-bit rollover
problem with the filesize (i.e. gzip -l won't show the right size), but
you should be able to gzip and gunzip files over 4gb with no other
problems.

-- 
	Dan Nelson
	dnelson at allantgroup.com


More information about the freebsd-questions mailing list