All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Yoshinori K. Okuji" <okuji@enbug.org>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: Creating grub/grub2/grldr.mbr bootrom with makerom
Date: Sat, 22 Dec 2007 10:47:04 +0100	[thread overview]
Message-ID: <200712221047.05173.okuji@enbug.org> (raw)
In-Reply-To: <ca0f59980712220103k7dcdded8wbeaa303c2c1e10ec@mail.gmail.com>

On Saturday 22 December 2007 10:03, Bean wrote:
> On Dec 22, 2007 4:06 PM, Yoshinori K. Okuji <okuji@enbug.org> wrote:
> > On Friday 21 December 2007 20:04, Robert Millan wrote:
> > > How well does compression work for GRUB 2 ?  core.img is already
> > > compressed (with lzo); if LZMA makes better results perhaps it'd be a
> > > good idea to switch.
> >
> > It's not that simple. LZO was chosen instead of gzip, because of the size
> > requirement on PC. To preserve safety, we need to keep the core part less
> > than 31.5KB (63 sectors).
> >
> > The size is the sum of non-compressable bootstrap code, decompression
> > code and compressed code + data. When I made an experiment in PUPA,
> > although gzip had a better compression ratio, due to the decompression
> > code size, LZO won.
> >
> > I don't know precisely, but I suspect that decompression code for LZMA
> > would be slightly larger than gzip's (IIRC, a range coder is likely to
> > require more code and data). So I don't expect that LZMA can replace the
> > current usage of LZO in normal PC so easily.
>
> The decompression code for LZMA is very small, i use -Os option to
> compile LzmaDecode.c, the result is about 2.8K.

Thank you for your information. In my estimate, LZMA will outperform, if the 
ratio, compressed size : original size, is less than 0.52. So LZMA might 
win. :)

Okuji



      reply	other threads:[~2007-12-22  9:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-21 18:50 Creating grub/grub2/grldr.mbr bootrom with makerom Bean
2007-12-21 19:04 ` Robert Millan
2007-12-22  3:57   ` Bean
2007-12-22  8:06   ` Yoshinori K. Okuji
2007-12-22  9:03     ` Bean
2007-12-22  9:47       ` Yoshinori K. Okuji [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200712221047.05173.okuji@enbug.org \
    --to=okuji@enbug.org \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.