[ECOS] ZLIB uncompress() returns Z_DATA_ERROR when reading images created with older ZLIB

Dan Jakubiec dan.jakubiec@systech.com
Mon Oct 30 21:49:00 GMT 2006


Hi, I'm looking for some help with a ZLIB problem.  Our current eCos 
code base is using ZLIB code from the 2003-06-19 eCos snapshot.  Our 
eCos application uses ZLIB to compress() data before storing it to 
flash, and then uses ZLIB to uncompress() it when reading it from flash.

I am trying to upgrade our ZLIB support to the current head revision but 
have found that the new ZLIB code is not able to uncompress() data which 
was compressed with the old ZLIB code.  Doing so returns a 
Z_DATA_ERROR.  Does anyone have any idea of what's going on here, or how 
to debug it?  Specifically: any ideas on how I can get the new ZLIB to 
read the old compressed data?

As a side note: the current ZLIB does seem to work correctly with newly 
compressed data.  In other words, it is able to uncompress() data which 
has been compressed with the new ZLIB, as well as data compressed with 
recent gzip host utilities.  So it looks like something peculiar to the 
way the old eCos/ZLIB previously compress()'d images.

Thanks in advance for any help,

-- 
Dan Jakubiec
Systech Corporation


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss



More information about the Ecos-discuss mailing list