octave-maintainers
[Top][All Lists]
Advanced

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

Proposal: load() and save() to open file diescriptors


From: Judd Storrs
Subject: Proposal: load() and save() to open file diescriptors
Date: Wed, 12 Sep 2012 15:59:07 -0400

I have a directory tree containing ~6GB worth of "save -binary data.mat" files created by octave. I can compress these using gzip and octave will happily load() data.mat.gz. But in testing, gzip only saves 11% vs 38% with lzma for this data. From what I can tell, octave doesn't support lzma. So, I'm proposing adding generic open file descriptor support to load() and save() so that something like this would be possible:

    data = "" (1048) ;

    fid = popen ( "lzma > data.mat.lzma", "w" ) ;
    save ( fid, "-binary", "data" ) ;
    fclose ( fid ) ;

    fid = popen ( "lzcat data.mat.lzma", "r" ) ;
    load ( fid ) ;
    fclose ( fid ) ;

Or would it be better to add lzma support directly to save() and load()?


--judd


reply via email to

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