git-archive-all icon indicating copy to clipboard operation
git-archive-all copied to clipboard

Passing compression level with `xz` or `txz` output formats does not work

Open qmonnet opened this issue 2 years ago • 0 comments

Tar output formats xz and txz do not work when passing an explicit compression level:

$ python3 ./git_archive_all.py /tmp/foo.zip -9
[works]
$ python3 ./git_archive_all.py /tmp/foo.xz  -9 
xz cannot be compressed
$ python3 ./git_archive_all.py /tmp/foo.txz -9
txz cannot be compressed

From this link, it looks like these formats expect the compression level to be passed by the preset argument in tarfile.open(), instead of compresslevel.

qmonnet avatar May 24 '23 09:05 qmonnet