[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: /usr/share/doc/ files and gzip/xz/no compression



On Sun, Aug 21, 2011 at 04:03:57PM +0100, Colin Watson wrote:
> On Sat, Aug 20, 2011 at 08:30:24PM +0100, Darren Salt wrote:
> > It's worth mentioning that man-db has had xz support since March last year
> > (upstream). This is available in testing.
> 
> Although I'd also like to mention that I expect that it would take
> rather longer for mandb to process /usr/share/man if all of the manual
> pages there were xz-compressed rather than gzipped, as it would have to
> exec an external command for every page rather than using a library.

This is not a real argument as liblzma2 works just as well as zlib.

> I support xz-compressed pages because you sent me a reasonable patch and
> it might occasionally help somebody, but I don't recommend it for global
> use in Debian.

However, I do agree that it's generally not a good idea, but for a different
reason: xz has a slow start, and below a few thousand bytes of compressed
size gzip usually packs better.

Man pages tend to be smaller than that: out of 94752 man pages in main,
71966(!) are smaller with gzip, and 94088 have gzip < 110% of xz.

This goes in stark contrast to whole packages, where even empty ones usually
have enough junk (copyright, changelog.Debian.gz) that they tend to compress
better with xz -- and sizes of dummies are lost in underflow compared to
real ones.

Thus, just as I strongly recommend using xz everywhere for .deb files, let's
use gzip everywhere for man pages with no more than a few exceptions.

_All_ files where changing compression gives a gain of >10KB are:

     gz |     xz | gz-xz | filename
  44492 |  32888 | 11604 | man3/QGauss.3.gz
  46174 |  32716 | 13458 | man3/Color::Library::Dictionary::NBS_ISCC::M.3pm.gz
  66121 |  51340 | 14781 | man3/InfFE.3.gz
  67316 |  52272 | 15044 | man3/ContinuationSystem.3.gz
  76441 |  58656 | 17785 | man1/gm.1.gz
  99346 |  73964 | 25382 | man5/postconf.5.gz
 136446 | 106680 | 29766 | ru/man1/mplayer.1.gz
 179569 | 134548 | 45021 | man3/Image::ExifTool::TagNames.3pm.gz
 153320 | 100544 | 52776 | man3/FE.3.gz


-- 
1KB		// Yo momma uses IPv4!

Attachment: signature.asc
Description: Digital signature


Reply to: