[Numpy-discussion] numpy.savez does /not/ compress!?

Hans Meine meine@informatik.uni-hamburg...
Tue Jun 8 05:03:46 CDT 2010

On Tuesday 08 June 2010 11:40:59 Scott Sinclair wrote:
> The savez docstring should probably be clarified to provide this
> information.

I would prefer to actually offer compression to the user.  Unfortunately, 
adding another argument to this function will never be 100% secure, since 
currently, all kwargs will be saved into the zip, so it could count as 
behaviour change.

I would propose sth. like the attached patch.  (I only chose ZIP_STORED as 
default for maximum backward compatibility.)

> I guess that the default (uncompressed Zip) is used because specifying
> the compression as ZIP_DEFLATED requires zlib to be installed on the
> system (see zipfile.ZipFile docstring).

Yes, that was my thought, too.  Nevertheless, numpy might make a different 
decision, no?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: numpy_compressed_savez.diff
Type: text/x-patch
Size: 2130 bytes
Desc: not available
Url : http://mail.scipy.org/pipermail/numpy-discussion/attachments/20100608/3006acef/attachment-0001.bin 

More information about the NumPy-Discussion mailing list