Save, /Compress (was Re: reading in binary data) [message #17275] |
Thu, 16 September 1999 00:00 |
Dick Jackson
Messages: 347 Registered: August 1998
|
Senior Member |
|
|
David Fanning wrote:
>
> P.S. Do I remember reading somewhere that IDL 5.3 has
> implemented some kind of file compression scheme into
> its SAVE files? Can't put my hands on it now, but it
> sure sticks in my head somehow.
From What's New in IDL 5.3 beta:
The SAVE procedure also has a new COMPRESS keyword that causes IDL to write
all data to the SAVE file using the ZLIB compression library to reduce its
size.
A quick test with an RGB video-capture image gives encouraging results:
IDL> help,a
A BYTE = Array[3, 640, 480]
IDL> save,a,filename='a.sav'
IDL> save,a,/compress,filename='a-compress.sav'
File listing:
-rw-rw-rw- 1 djackson 0 193973 Sep 16 10:04 a-compress.sav
-rw-rw-rw- 1 djackson 0 922880 Sep 16 10:04 a.sav
And yes, restoring from either gives the exact same array! :-)
Cheers,
--
-Dick
Dick Jackson Fanning Software Consulting, Canadian Office
djackson@dfanning.com Calgary, Alberta Voice/Fax: (403) 242-7398
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|