Forgot to hit reply-all. Oops.
-- Forwarded message -
From: Mingye Wang
Date: Mon, Nov 17, 2025 at 11:52 AM
Subject: Re: zipapp: add compression (method), compresslevel options
from Zipfile
To: Abdur-Rahmaan Janhangeer
Yes I do! It's a very small change on top of the existing zipapp.py.
You can just run it with "python zipapp.py". I've tried using it to
make zstd and stored archives.
Tangential: the zip file format compresses each file separately, which
reduces the potential for good compression compared to "solid" formats
like .tar.gz. We can, however, work around this issue by using two
layers of zipping: the inner layer using "store", the outer layer
using whatever compression method is chosen by the user. But let's do
one thing at a time for now.
--
Mingye Wang (Artoria2e5)
On Sun, Nov 16, 2025 at 10:43 AM Abdur-Rahmaan Janhangeer
wrote:
>
> You have some demo code for it?
>
>
> Kind Regards,
>
> Abdur-Rahmaan Janhangeer
> about | blog
> github
> Mauritius
>
> On Mon, 10 Nov 2025, 07:18 Mingye Wang via Python-list,
> wrote:
>>
>> Zipapp is meant to produce things that will be delivered to an end-user. In
>> this way it should behave like most packaging tools and offer more
>> "thorough" compression options, limited only by the version of the Python
>> interpreter on the user's side (more specifically, their zipfile modules).
>> As a result I believe we should be allowed to choose the compression method
>> and compression level. Some seconds spent on the developer's computer can be
>> minutes saved on downloading from a poor Internet connection.
>>
>> My proposed API surface include two keyword-only parameters, compression and
>> compresslevel, both having the same meaning and type as their Zipfile
>> counterparts. The compression option should take precedence over the current
>> boolean "compressed" option if it is not set to None; otherwise the
>> settings, including the defaults for "compressed" apply.
>> --
>> https://mail.python.org/mailman3//lists/python-list.python.org
--
https://mail.python.org/mailman3//lists/python-list.python.org