Bug 158731 - rpm packages don't use the maximum force for xz compression
Summary: rpm packages don't use the maximum force for xz compression
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Installation (show other bugs)
Version:
(earliest affected)
24.8.0.0 alpha0+
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: needsDevAdvice
Depends on:
Blocks: Installer-Linux
  Show dependency treegraph
 
Reported: 2023-12-16 11:53 UTC by Jérôme
Modified: 2024-01-12 17:06 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jérôme 2023-12-16 11:53:02 UTC
From the daily build language pack LibreOfficeDev_24.8.0.0.alpha0_Linux_x86-64_rpm_langpack_de.tar.gz, 7z tells that the below rpm uses the xz compression method :
------------------------------
$ 7z l libreofficedev24.8-dict-de-24.8.0.0.alpha0-1.x86_64.rpm 
[...]
Path = libreofficedev24.8-dict-de-24.8.0.0.alpha0-1.x86_64.cpio.xz
Type = xz
Physical Size = 16392316
Method = LZMA2:20 SHA256
Streams = 1
Blocks = 28
------------------------------

Next, I extracted the content of this rpm package with the below command :
7z x libreofficedev24.8-dict-de-24.8.0.0.alpha0-1.x86_64.rpm

This extracts the below file :
libreofficedev24.8-dict-de-24.8.0.0.alpha0-1.x86_64.cpio

Next I compressed this cpio archive with xz using the minimum and maximum force :
------------------------------
$ xz -1 --stdout libreofficedev24.8-dict-de-24.8.0.0.alpha0-1.x86_64.cpio > d-1.xz
$ xz -9 --stdout libreofficedev24.8-dict-de-24.8.0.0.alpha0-1.x86_64.cpio > d-9.xz
------------------------------

Looking at the size of the files, it seems the rpm uses a low compression force of xz :
------------------------------
$ ls -lhS *
-rw-r--r-- 1 j j  82M déc.  16 03:39 libreofficedev24.8-dict-de-24.8.0.0.alpha0-1.x86_64.cpio
-rw-r--r-- 1 j j  16M déc.  16 03:39 libreofficedev24.8-dict-de-24.8.0.0.alpha0-1.x86_64.rpm
-rw-r--r-- 1 j j  16M déc.  16 12:06 d-1.xz
-rw-r--r-- 1 j j 3,8M déc.  16 12:05 d-9.xz
------------------------------

The memory requirement on GNU/Linux in order to use LibreOffice is at least 256MB but prefered 512MB :
https://www.libreoffice.org/get-help/system-requirements/#Linux

The man page of xz tells :
"decompressing a file created with xz -9 currently requires 65 MiB of memory".

So there is no limitation to use the maximum force ("-9") for xz compression inside rpm. 

Users would then be able to download rpm files faster. The servers would save storage and bandwidth. As this is a single compression for many downloads, the maximum compression force for xz would provide an overall benefit.
Comment 1 Stéphane Guillou (stragu) 2024-01-12 17:06:14 UTC
Thanks Jérôme.
Same as for bug 158732, waiting for input from Cloph or Xisco (or any other savvy packager) on how doable that is for our installers and if there's any reason we shouldn't.