Posts: 4
Joined: Sun Jan 18, 2015 11:56 am

Raspbian and XZ compression

Mon Apr 11, 2016 3:50 pm


I wonder why Raspbian is still using basic zip as a compression tool to distribute the images to user.

I've been doing some research recently on optimizing the set of XZ options for different firmware images and was able to cut down the size of Raspbian from current 1471 MB to 965 MB (actually, 947 MB in best scenario, but in this case decompression takes a lot of RAM). That is why I suggest moving Raspbian to .xz when distributing since almost 0.5 GB would be off the servers and download time would also be a win.

The tools would be no trouble -- Disks on GNOME is able to write to SD from .img.xz which is obviously cool since you don't have to unzip and advanced users are perfectly fine with unxz | dd. On Windows, I worked on a tool similar to Win32DiskImager which has a couple of features like writing image to a number of SD cards at once and XZ support. I would not say that this tool is totally perfect and I would greatly appreciate any help or advice, but it's worth checking out due to the features.

Here is a draft version of my paper ( ... 0toaFNERGc) so everyone can read it and check out the awesomeness of tuning the XZ to the ultimate.

Looking forward to your opinions,
Roman Belkov

User avatar
Posts: 3088
Joined: Tue Oct 11, 2011 8:38 pm

Re: Raspbian and XZ compression

Mon Apr 11, 2016 4:05 pm

NOOBS uses XZ compression for its images, so it is not that the Foundation have not heard of it. It can only be that they think ZIP is more convenient or portable for standalone files.

ZIP works on more platforms and in more software, without additional downloads. You seem to be admitting that you had to write your own DiskImager to support .img.xz on Windows.

User avatar
Posts: 5962
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: Raspbian and XZ compression

Mon Apr 11, 2016 4:07 pm

Because 96,87% of Windows users have never heard about XZ ( or bzip for that matter )
I'm guessing quite a few Linux users don't know it exist either.

Posts: 4
Joined: Sun Jan 18, 2015 11:56 am

Re: Raspbian and XZ compression

Mon Apr 11, 2016 4:22 pm

Of course, these comments do make sense, but the users that don't care won't care about the change.

On Windows, ideally, everything would be moved to a tool that supports compressed images, which is even better because you don't have to uncompress and then fire up Win32DiskImager -- two actions would be a single action for them (and the tool is here already, despite the fact I had to write it).

Return to “Raspbian”