octave-maintainers
[Top][All Lists]
Advanced

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

Re: Read/write gzipped files directly


From: Paul Kienzle
Subject: Re: Read/write gzipped files directly
Date: Thu, 1 Jul 2004 07:00:06 -0400

Tcl virtualized the whole filesystem interface.  This allows
users to add interesting extensions like reading files from
archives.  Since it is at the lowest level, you can even
put scripts in an archive and have the system load them.  This
is great for delivering apps --- a single file executable
contains the complete scripting context.  This would also
be useful for distributed octave since you could add support
for having part of the load path on the controlling machine.

Of course, some code changes would be required to do
this in octave.

Paul Kienzle
address@hidden

On Jul 1, 2004, at 2:19 AM, Dmitri A. Sergatskov wrote:

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]