Re: About support XZ-compressed kernel on x86

From: Baoquan He
Date: Wed Feb 17 2016 - 19:48:27 EST


On 02/17/16 at 07:57pm, Lasse Collin wrote:
> On 2016-02-16 Baoquan He wrote:
> > On 02/15/16 at 10:26pm, Lasse Collin wrote:
> > > Yes, like all zeros. I wrote another explanation just in case it
> > > helps:
> >
> > Yes, this is great and very helpful for people who want to understand
> > this details. I want to make some change to improve the readability of
> > the description in boot/compressed/misc.c, do you mind if I put these
> > there? Or you can post a patch to adjust it.
>
> It's fine for me if you want to do it, although I think the current
> description there is quite good already.

OK. I still don't understand below snippet taken from misc.c. As you
said overwriting happened when the write position quickly approaches the
read position. how could it happpen if the input pointer is moving
faster than the output pointer?


* The output pointer can only overrun the input pointer if the input
* pointer is moving faster than the output pointer. A condition only
* triggered by data whose compressed form is larger than the
* uncompressed
* form.

Thanks
Baoquan

>
> --
> Lasse Collin | IRC: Larhzu @ IRCnet & Freenode