Re: [PATCH] init: bzip2 or lzma -compressed kernels and initrds

From: JÃrn Engel
Date: Mon Sep 08 2008 - 09:15:17 EST


On Sun, 7 September 2008 01:17:55 -0500, Rob Landley wrote:
>
> I vaguely recall that lzma requires more memory to decompress than bzip2 does,
> although I don't remember the details. I know that bzip2 takes around 4 megs
> (although you need space for the decompressed kernel on _top_ of that, so you
> should be able to do it in about 8 megs total). gunzip uses a 64k sliding
> window plus dictionary and the whole mess should fit in about 1/4 of a meg.

Less, actually. Iirc gzip takes about 280k for compression and
somewhere below 100k for decompression with the kernel runtime zlib.
The various copies that unpack kernels at boottime may be worse - they
are certainly rather old copies of zlib and haven't seen much
maintenance since.

JÃrn

--
Don't worry about people stealing your ideas. If your ideas are any good,
you'll have to ram them down people's throats.
-- Howard Aiken quoted by Ken Iverson quoted by Jim Horning quoted by
Raph Levien, 1979
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/