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

Home » Public Forums » archive » How to read a file in zip or gz format using IDL?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: How to read a file in zip or gz format using IDL? [message #2620 is a reply to message #2507] Thu, 04 August 1994 08:34 Go to previous messageGo to previous message
8015 is currently offline  8015
Messages: 52
Registered: November 1993
Member
In article <31ocemINNbqu@maz4.sma.ch>, Tan, Jun <j.tan@rutherford.ac.uk> wrote:
>
> I am asking for help to read a file in zip or gz format using IDL. At the
> moment, I have a huge data file in ASCII format about 10 Mbytes, it thus
> takes a long time to read in all the data. I wonder it may take less time if
> the data is compressed using either zip or gzip methods. But how can I read
> such compressed file? Any advice over there is highly appreciated.
>

I'll start by assuming we're referring to IDL in a unix environment.
You can use the spawn command to manager this. Create a command string
such as:

cmd = "uncompress -c comp_file" ; comp_file is the compressed file
spawn, cmd, uncomp_file ; uncomp_file will have the uncompressed data

The -c decompresses to stdout. Also the zcat command (linked to
uncompress) will do the same thing. This way you won't have to 'rm' the
file afterwards. I'm sure gzip has the same facility and could be used
just as easily.

Mike Schienle Hughes Santa Barbara Research Center
8015@sbsun0010.sbrc.hac.com 75 Coromar Drive, M/S B28/87
Voice: (805)562-7466 Fax: (805)562-7881 Goleta, CA 93117
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Diagnostic printout
Next Topic: Different shifts on rows of matrices

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

Current Time: Fri Oct 10 17:11:16 PDT 2025

Total time taken to generate the page: 0.32344 seconds