-
-
Notifications
You must be signed in to change notification settings - Fork 503
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DietPi-Imager | Move from 7z to xz for image compression #6591
Conversation
Why? It's significantly slower. As in a LOT slower. For fairly marginal gain. |
using xz you could flash an image directly using the archive to SD card, while it was needed to extract on 7z first. |
So this is a comment about some SD card writing tools like Pi Imager being able to convert Put differently - the only time |
7z and xz both use LZMA2 (by default) and hence have similar (de)compression stats. Main reason indeed is the simple single file (de)compression (it automatically adds/removes the xz extension resp. by default removes the archive/original, like gzip, bzip2 and also zstd tools do) and pipe support. Decompression speed is acceptable and usually not the bottleneck when flashing to a drive directly. I like to keep using LZMA2 as IMO download bandwidth and disk space usage is more a concern then (de)compression speed, and it still achieves a better compression ratio than zstd on highest level (which also reduces its performance benefit). Basically we align it with Armbian, APT repos, Linux kernel sources etc, which all use xz nowadays, while e.g. zstd is not as widely used/known. A practical example is that 7zip (which I use on Windows as standard archiver) does not support zstd yet, so it is the only compression algorithm I need an extra tool for, annoyingly... |
Thanks for the detailed response. |
- CHANGELOG | Images: All our images are now compressed via xz instead of 7z. These are a little easier to handle, especially on Linux hosts, and many flashing utilities allow to flash zx-compressed images directly to disk, without the need to manually decompress them first. As xz compresses files and no directories, the dedicated README.md and hash text files are not included anymore. The hashes for integrity checks within an archive have no real purpose, as the compression algorithms imply hashes internally (CRC64 in case of xz), which are checked and integrity of the content assed as part of the decompression.
No description provided.