comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: True size of a gzip compressed file?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: True size of a gzip compressed file? [message #33778] Tue, 28 January 2003 14:03
Mark Hadfield is currently offline  Mark Hadfield
Messages: 783
Registered: May 1995
Senior Member
"Wayne Landsman" <landsman@mpb.gsfc.nasa.gov> wrote in message
news:3E36E953.99BA18EE@mpb.gsfc.nasa.gov...
> When one opens a gzip compressed file using the /COMPRESS keyword to
> OPENR, does anyone know if there is a way to quickly get the size in
> bytes of the uncompressed file?...
> ...
> One quick way is to spawn to a "gzip -l" command and parse the
> output. However, I worry about getting different output depending
> on which shell or OS is being used. But I believe it does show that
> one can get this information without reading the entire file.

From a quick look at how "gzip -l" is implemented (see lines 1361-1380
or so of gzip.c in...

ftp://wuarchive.wustl.edu/mirrors/gnu/gzip/gzip-1.2.4.tar.gz

...) and a quick look at the contents of a gzippped file, I surmise
that the uncompressed file size is stored at the end of the file (but
only, perhaps, if the DEFLATE compression method has been used).

--
Mark Hadfield "Ka puwaha te tai nei, Hoea tatou"
m.hadfield@niwa.co.nz
National Institute for Water and Atmospheric Research (NIWA)
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: True size of a gzip compressed file?
Next Topic: IDL dcube file format

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:04:32 PDT 2025

Total time taken to generate the page: 0.84352 seconds