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

Home » Public Forums » archive » sec : U Re: Gzip / compression handling?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
sec : U Re: Gzip / compression handling? [message #32253 is a reply to message #32252] Mon, 23 September 2002 16:09 Go to previous message
Andrew Cool is currently offline  Andrew Cool
Messages: 219
Registered: January 1996
Senior Member
Doug Rowland wrote:
>
> Does anyone know how to handle compressed files in IDL?
> Is the /COMPRESS keyword platform-independent?
>
> Maybe more importantly, I want to take a data stream over a network that
> is compressed with gzip, and uncompress it in memory. Any easy way of
> doing this? I would like to avoid writing the stream to disk and then
> reading it back in using the /COMPRESS keyword to OPENR, as that might
> introduce lots of overhead.
>
> Thanks.
>
> Doug


Doug,

You might want to look at the GZIP routines provided by Randall Frank
in his IDL_TOOLS routines.

You can find IDL_TOOLS at Ronn Kling's site :- http://www.rlkling.com/
under 'Freeware'.

Andrew

------------------------------------------------------------ -----------------
Andrew D. Cool
Electromagnetics & Propagation Group
Intelligence, Surveillance & Reconnaissance Division
Defence Science & Technology Organisation
PO Box 1500, Edinburgh
South Australia 5111

Phone : 061 8 8259 5740 Fax : 061 8 8259 6673
Email : andrew.cool@dsto.defence.gov.au
------------------------------------------------------------ -----------------


---------------------------------------
Gzip:

err = GZIP('infile','outfile')

Compress the contents of the input file to the output file
in .gz format. The outfile can be read with gunzip.

err = GZIP( var, 'outfile')

Compress the binary contents of the IDL variable VAR to
the output file in .gz format.

err = GUNZIP('infile','outfile')

Uncompress the input (.gz) file to the specified output file.

err = GUNZIP('infile', var [,LENGTH=l[,OFFSET=o])

Uncompress the input (.gz) file into an IDL byte array.
The LENGTH and OFFSET keywords specify the number of bytes
to skip over in the (uncompressed) input stream and the
number of bytes to return in VAR.

err = PACKVAR( invar, outvar)
err = UNPACKVAR( invar, outvar)

These two routines pack an IDL variable into another IDL
variable (byte array) using gzip compression. Note: the
unpack function will reconstruct the original variable
type and there is about a 50 byte overhead for the
compression. So, you won't see any real compression unless
the input variable is more than 100 bytes in length or so.

---------------------------------------
[Message index]
 
Read Message
Read Message
Previous Topic: Gzip / compression handling?
Next Topic: Re: Gzip / compression handling?

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

Current Time: Sat Oct 11 13:13:53 PDT 2025

Total time taken to generate the page: 1.44289 seconds