summaryrefslogtreecommitdiff
path: root/lib_generic/gunzip.c
AgeCommit message (Collapse)Author
2009-12-21move prototypes for gunzip() and zunzip() to common.hWolfgang Wegner
Prototype for gunzip/zunzip was only in lib_generic/gunzip.c and thus repeated in every file using it. This patch moves the prototypes to common.h and removes all prototypes distributed anywhere else. Signed-off-by: Wolfgang Wegner <w.wegner@astro-kom.de>
2009-04-30lib_generic: gunzip: New function zunzipRicardo Ribalda Delgado
Separate gunzip in gunzip: Find the end of the header and call zunzip. zunzip: Inflate gunzip block without header. UBI fs blocks can be compresed in lzo, zlib or no-compression. The current implementation of u-boot supported all the compressions but there was a bug in the implementation of the zlib blocks. UBIFS's Zlib blocks do not have header but they were compressed using gunzip, a function used to decompress gunzip files/sectors with a header. This patch adds a new function zunzip that uncompress a zlib block with no header. Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@uam.es>
2009-04-04rename include/zlib.h to include/u-boot/zlib.hJean-Christophe PLAGNIOL-VILLARD
Some systems have zlib.h installed in /usr/include/. This isn't the desired file for u-boot code - we want the one in include/zlib.h. This rename will avoid the conflict. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-01-27Fix gunzip in case of insufficient output bufferMatthias Fuchs
U-Boot's gunzip() function does not handle the return code of zlib's inflate() function correctly. gunzip() is implemented to uncompress all input data in one run. So the correct return code for the good case is Z_STREAM_END. In case of insufficient output buffer memory inflate returns Z_OK. For gunzip() this is an error. It also makes sense to me to call inflateEnd() also in case of an error. Signed-off-by: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
2008-08-29gunzip: move to lib_genericJean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>