octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Read/write gzipped files directly


From: Dmitri A. Sergatskov
Subject: Read/write gzipped files directly
Date: Thu, 01 Jul 2004 00:19:58 -0600
User-agent: Mozilla Thunderbird 0.7.1 (X11/20040626)

I was thinking if it would be a good idea to get Octave's
to read (and perhaps write) gzipped files directly (using zlib).
At first, the  change seems quite straightforward (from zlib.h):

     gzopen can be used to read a file which is not in gzip format; in this
   case gzread will directly read from the file without decompression.

And you can use gzgets and gzetc on a regular file as well.

I can see few advantages: ascii files gets compressed quite a bit and we
probably can circumvent current 2Gb limit; reading of the large files off
harddrive may become faster (it was faster for my program that were using lzo
library instead of gzip).

The disadvantage (besides the need to write some code:) is that it would require
yet another library. (I guess configure can check for zlib and do open -> gzopen
etc... substitutions).

It all may be more complicated for C++ (than for straight C), but this is
just a thought...

Sincerely,
Dmitri.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]