Search code examples
zlibwindows-embedded-compact

zLib for WindowsCE and ARM platform


Background

An application that I am designing (on Windows CE7 running over an ARM Cortex A8) receives files from a PC(Windows 64bit) over an Ethernet link.

The files contain data compressed using the zLib version 1.2.11 (https://zlib.net/).

On my device application, I have to uncompress the files and process them.

  • I found a port of zLib for Windows CE (http://www.tenik.co.jp/~adachi/wince/zlibce/index.html) but it is based on the revision 1.1.4 of zLib. Will this revision mismatch be an issue while decompressing the data (that was compressed using the Version 1.2.11)?
  • What steps are required to use the zLib source to build it into a static library that can be used on a Windows Embedded over an ARM Cortex platform? From the zLib manual, I understand that it is a native C code that can be compiled for any OS and hardware platform. But while building I came across some assembly code as well that is probably written for an Intel x86. For porting to Windows CE + ARM Cortex platform would then require translation of this assembly code as well?
  • How to manage the difference in endianness of the compressing side and decompressing side? UPDATE: I missed this part in the zLib FAQ, it says that the difference in endianness is not an issue.

Thanks in advance


Solution

  • zlib compressed data is fully compatible forward and backward through all zlib versions.

    The code in the contrib directory, including x86 and other assembler code there, are all third party contributions and are not part of zlib. You do not need them.

    As you found, zlib produces and consumes bytes, so there are no endianess issues.