john-packages icon indicating copy to clipboard operation
john-packages copied to clipboard

Maybe stop using 7z

Open solardiz opened this issue 1 year ago • 7 comments

I ran a couple of polls on Feb 7, 2024, and 7z appears to be a really unpopular choice of a download file format.

https://twitter.com/solardiz/status/1755221747626885298

When given a choice, I usually prefer to download a
zip - 33.1%
7z - 10%
tar.gz - 38.5%
tar.xz - 18.5%
130 votes

https://twitter.com/solardiz/status/1755223774004158819

When not giving a choice, downloads should be available only as
zip - 43.7%
7z - 7.6%
tar.gz - 39.5%
tar.xz - 9.2%
119 votes

We can still use the program 7z to produce zip or tar.gz archives with slightly better compression than the usual zip or gzip programs would. IIRC, I did just that for our 1.9.0-jumbo-1 release archives.

solardiz avatar Apr 14 '24 18:04 solardiz

We should make users happy, but I'm afraid the zip format is simple and ineffective.

7z a -mfb=258 -mpass=15 -r winX64_1_JtR.zip JtR/
# versus
7z a -t7z -m0=lzma -mx=9 -mfb=64 -md=128m -ms=on winX64_1_JtR.7z JtR/
$ ls -lh
total 101M
drwxrwxrwx 5 vscode vscode 4.0K Apr  7 15:11 JtR
-rw-r--r-- 1 vscode vscode  29M Apr 14 21:07 winX64_1_JtR.7z
-rw-r--r-- 1 vscode vscode  72M Apr 14 21:05 winX64_1_JtR.zip

In this case, should we educate people or give up and deliver a zip?

claudioandre-br avatar Apr 14 '24 21:04 claudioandre-br

Someone may be aware of the size difference, yet prefer a zip not to have to separately download and verify authenticity of (how?) and take the risk of using 7zip. I think zip is supported on Windows out of the box now, isn't it? Perhaps ditto on macOS.

BTW, here are the commands I wrote down from when I released 1.9.0-jumbo-1:

V=1.9.0-jumbo-1
chmod -R go-rwx john-$V
tar cvJf john-$V.tar.xz --owner=root --group=root `find john-$V ! -type d | sort -i -t / -k 3 | sort -i -t . -k 3`
xzcat john-$V.tar.xz | pigz -11 > john-$V.tar.gz

rm ../doc/README
find ../doc ../run/rules -type f -exec sed -i -e 's/\r*$/\r/' {} ';'
sed -i -e 's/\r*$/\r/' ../README.md ../run/*.conf ../run/password.lst
find ../doc -type f -not -name '*.txt' -not -name '*.md' -exec mv -v '{}' '{}'.txt \;

7za a -t7z -m0=lzma -mx=9 -mfb=64 -md=128m -ms=on john-1.9.0-jumbo-1-win32.7z john-1.9.0-jumbo-1-win32
7za a -t7z -m0=lzma -mx=9 -mfb=64 -md=128m -ms=on john-1.9.0-jumbo-1-win64.7z john-1.9.0-jumbo-1-win64

7za a -tzip -mx=9 john-1.9.0-jumbo-1-win32.zip john-1.9.0-jumbo-1-win32
7za a -tzip -mx=9 john-1.9.0-jumbo-1-win64.zip john-1.9.0-jumbo-1-win64

solardiz avatar Apr 14 '24 21:04 solardiz

[edited]

The final result is:

  • flatpak bundle is, well, already a bundle (no real compression). No need to have a .7z file;
  • is a tar file needed? IMO, zip is fine.
  • let's see what people do and stop providing the 7z if no one uses it.

image

claudioandre-br avatar Apr 15 '24 11:04 claudioandre-br

Thank you, @claudioandre-br!

let's see what people do and stop providing the 7z if no one uses it.

How would we know?

solardiz avatar Apr 15 '24 21:04 solardiz

We can use the release statistics. GitHub has an API for it; easy to get data from it.


And, well, users are welcome to interact with us.

claudioandre-br avatar Apr 15 '24 21:04 claudioandre-br

I've just checked our web server logs for recent 1.9.0-jumbo-1 Win64 downloads in ZIP vs. 7z. These are at 57% for ZIP vs. 43% for 7z (percentages out of their combined total, which includes some duplicate downloads by the same people). So both formats are popular (but ZIP is more popular even despite of the larger size), and I think we should keep both. These percentages are for full size one-shot downloads (HTTP code 200 with the full file size), but I am getting similar percentages for steps in partial downloads (HTTP code 206) even though I'd have expected their number to be inflated more by ZIP's larger size. Edit: also got similar percentages (55% ZIP, 45% 7z) for another (non-overlapping) time period.

solardiz avatar Apr 16 '24 14:04 solardiz

This issue is stale because it has been open for 14 days with no activity.

github-actions[bot] avatar May 12 '24 02:05 github-actions[bot]

"This issue was closed because it has been inactive for 7 days since being marked as stale."

github-actions[bot] avatar May 19 '24 02:05 github-actions[bot]