[U-Boot] [PATCH 3/3] ubifs: BUG: Blocks commpressed with zlib

Mike Frysinger vapier at gentoo.org
Mon Apr 27 18:00:38 CEST 2009


On Monday 27 April 2009 08:36:55 Wolfgang Denk wrote:
> In message Ricardo Ribalda Delgado wrote:
> > Blocks compressed with zlib dont have the full gzip header.
> >
> > Without this patch, block compressed with zlib cannot be readed!
> >
> > Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda at uam.es>
> >
> > - * We need a wrapper for gunzip() because the parameters are
> > + * We need a wrapper for zunzip() because the parameters are
> >   * incompatible with the lzo decompressor.
> >   */
> >  static int gzip_decompress(const unsigned char *in, size_t in_len,
> >  			   unsigned char *out, size_t *out_len)
> >  {
> >  	unsigned long len = in_len;
> > -	return gunzip(out, *out_len, (unsigned char *)in, &len);
> > +	return zunzip(out, *out_len, (unsigned char *)in, &len, 0, 0);
> >  }
>
> If the only purpose of zunzip() is to be used here, then why do we not
> make the parameters fit the intended purpose, thus avoiding an
> additional wrapper?

not sure i follow ... what do you propose changing ?

easylogo can be changed to use this (a few Blackfin boards) because atm, 
compression support with that is implemented by running `gzip`.  this is 
because i wasnt able to figure out how to get the decompression routines in u-
boot to play with a zlib compressed stream (i.e. no gzip header).
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20090427/8ce93e7a/attachment.pgp 


More information about the U-Boot mailing list