On Thu, Jun 11, 2009 at 1:41 PM, Stef Mientki<stef.mien...@gmail.com> wrote: > Peter Otten wrote: >> Stef Mientki wrote: >>> Peter Otten wrote: >>>> Stef Mientki wrote: >>>>> I packed all sources with zipfile, >>>>> but the compression doesn't seem to be very good. >>>>> >>>> >>>> If you don't specify the compression, the files are not compressed at >>>> all. Just in case you didn't know... >>>> >>> >>> .. and would you be willing to tell me how I could set the compression ( >>> at maximum) ? >>> >> >> According to the documentation (hint, hint) there is only on and off. >> >> zipfile.ZipFile(filename, "w", compression=zipfile.ZIP_DEFLATED) >> >> > > sorry guys I made a mistake, > I did read the doc, but as there was no default value metioned,
Erm... class zipfile.ZipFile(file[, mode[, compression[, allowZip64]]]) Open a ZIP file [...] compression is the ZIP compression method to use when writing the archive, and should be ZIP_STORED or ZIP_DEFLATED; [...] The default is ZIP_STORED. [...] Though I admit the docs could definitely do with having "compression=ZIP_STORED" in the signature part of the doc. Cheers, Chris -- http://blog.rebertia.com -- http://mail.python.org/mailman/listinfo/python-list