[bug #68281] Stream MAT v7 compression directly to output files

"Dmitri A. Sergatskov" <[email protected]> Mon, 27 Apr 2026 16:39:36 -0400 (EDT)
Newsgroups gmane.comp.gnu.octave.bugs
Message-ID <[email protected]>
Please use the bug tracker to post updates to a bug report.  The mailing list is intended as a read-only notification stream.  Info posted to this mailing list address won't appear in the tracker database where it is most useful.

Follow-up Comment #7, bug #68281 (group octave):

Re-base to 35772:3f80864e2b30

(file bug68281_mat7_20260427_202.cset)

Some benchamrks:

octave:1> x = randi (255, 2^31-2, 1, "uint8"); # Uncompressable data
octave:2> tic; save ('-v6', 'x.mat6', 'x'); toc
Elapsed time is 0.343663 seconds.
octave:3> tic; save ('-v7', 'x.mat7', 'x'); toc
Elapsed time is 19.4377 seconds.
octave:4>  tic; save ('-binary', 'x.oct', 'x'); toc
Elapsed time is 0.393089 seconds.
octave:5> xx = ones(2^31-2, 1, "uint8"); # Highly compressable data
octave:6> tic; save ('-v6', 'xx.mat6', 'xx'); toc
Elapsed time is 0.330311 seconds.
octave:7> tic; save ('-v7', 'xx.mat7', 'xx'); toc
Elapsed time is 1.2199 seconds.
octave:8>  tic; save ('-binary', 'xx.oct', 'xx'); toc
Elapsed time is 0.327744 seconds.
octave:9> 


And compare that to running "gzip" on "mat6" files:

$ /usr/bin/time -v gzip x.mat6
	Command being timed: "gzip x.mat6"
	User time (seconds): 31.62
	System time (seconds): 0.42
	Percent of CPU this job got: 99%
	Elapsed (wall clock) time (h:mm:ss or m:ss): 0:32.10
...
$ /usr/bin/time -v gzip xx.mat6
	Command being timed: "gzip xx.mat6"
	User time (seconds): 1.75
	System time (seconds): 0.15
	Percent of CPU this job got: 99%
	Elapsed (wall clock) time (h:mm:ss or m:ss): 0:01.91
...


Dmitri.
-- 


(file #58519)

    _______________________________________________________

Additional Item Attachment:

Name: bug68281_mat7_20260427_202.cset Size: 14KiB

<https://file.savannah.gnu.org/file/bug68281_mat7_20260427_202.cset?file_id=58519>


    AGPL NOTICE

These attachments are served by Savane. You can download the corresponding
source code of Savane at
https://savannah.gnu.org/source/savane-c36938be85ff6c1b727bc7dd7fd30e48f9142870.tar.gz


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?68281>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc (application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE-----

iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCae/JiAAKCRCqLAuaBUf3
TjwVAQCL4flUTSt6lAopvmiDZ9LyuVS1O/C45NlXKuzlOIHl7QEA21qUYZxrKGh4
jnjKVUeK8kEWN960ef+VvBjkxxTZrwc=
=PsXx
-----END PGP SIGNATURE-----