I'm looking for a way in pure python to export a numpy array to either a text file or a compressed image file. My array is 500x700 so exporting it produces a file with a size of ~3mb. I need it to be at least under 1mb.
I've tried the tifffile package but the compression modes are only from 1 to 9 so it is not enough.
My file could be in a "matrix" format, a X Y Z format, a tiff image or other format type that does not lose data when compressing and that are compatible with GIS softwares.
I also need it to be in pure python and without external requirements (like calling a subprocess) if possible to avoid compatibility problems when running on a distant machine.¸
Any ideas?