JuliaIO / MAT.jl

Julia module for reading MATLAB files
MIT License
278 stars 71 forks source link

feat: allow writing compressed files #123

Closed radioflash closed 4 years ago

radioflash commented 4 years ago

This fixes the original effort from fguevaravas (#77), also adding a testcase for compression effectiveness, correcting some minor whitespace issues, and adding an example to README.md.

radioflash commented 4 years ago

There is still room for improvement:

Reference file (MATLAB 5.0): 5MiB Julia compressed: 18MiB Julia uncompressed: 215MiB

Interestingly, the reference file contains no uncompressed strings whatsoever, while the compressed Julia version keeps basically every fieldname as plaintext (my example stores a single Dict: String => Array{Float64, 2}).

But this is currently good enough for me, and it already helps a TON.

timholy commented 4 years ago

Looks like there's a merge conflict, probably from me merging the bit array test. Is your git-fu up to resolving it? If not, don't worry about it, I'll fix it.

timholy commented 4 years ago

Thanks @radioflash and @fguevaravas!