[bug #68091] Inefficient Integer Data Loading from MAT-Files

"Dmitri A. Sergatskov" <[email protected]> Mon, 27 Apr 2026 05:27:50 -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 #12, bug #68091 (group octave):

May be we should rename this bug report to just "Improve Loading Mat files"?

Playing around I discover a bug:

x = randi (255, 2^31-2, 1, "uint8");
save("test.mat7", "x", "-v7");
tic; load ("test.mat7"); toc


This results in: error: out of memory or dimension too large for Octave's
index type

The problem here is the same as in write path -- it reads the full compressed
payload into inbuf. Then allocates one huge std::string outbuf(destLen, ' ').
So it should probably be re-written as streaming deflator similar to what done
for compression in #68281/

Dmitri.
-- 



    _______________________________________________________

Reply to this item at:

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

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

iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCae8sFgAKCRCqLAuaBUf3
TmkuAQCt2bjmkgO0AEHAwsVzH9GIPUWDJl493X0yNzqxOuldgwD+OWdo3rxLaLWa
eEwkJQuRCTwKLMet975Cu7yytKQWEQo=
=JJ0D
-----END PGP SIGNATURE-----