zipfile doesn't compress very good, are there other solutions?
Stef Mientki
stef.mientki at gmail.com
Thu Jun 11 16:41:41 EDT 2009
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,
I did a few tests, and I made a mistake with these experiments.
Indeed the compression is much better now, just 15% larger than 7zip,
which is quit acceptable.
thanks again,
Stef
> Peter
>
>
More information about the Python-list
mailing list