I've tried for some hours now to get some kind of unpacking done on WinCE.
First idea: use CABs, since they're supported on Windows nearly by default (IE 4 or something). I had two CAB units for Delphi, adjusted both for FPC and got them to run under Win32 - but linking for WinCE caused some problems in FCI...something functions.
I then found the unit
unzip in the Lazarus/FPC folders. Works fine on Win32, but on WinCE I get the
misaligned data access error.
I gave up on those components and wrote two simple routines using TCompressionStream and TDecompressionStream. Oldest thing in the world and quite simple. But even on Win32, TDecompressionStream fails after byte 32767! CopyFrom will simply cut the file at 32K, manually copying 4KB blocks results in a file of the proper size, but with all bytes after the 32767th one wrong (FPC from subversion, release 3873, since never versions won't allow to build an ARM environment, thanks to the Interlock changes in systemh.inc and other files that now result in an unresolved forward or something).
Four methods - all somewhat broken. Is there any part of the compression/decompression routines in FPC that is known to run with WinCE?
Update: method 5, using bzip2 and pasbzip example. Works on Win32, stops the application without any apparent error message on Windows CE.
Now if the DecompressionStream would at least work... it behaves the same faulty way on both Win32 and WinCE, so if it would work on Win32 again, I guess it also could on WinCE...
Update method #6: gzip from freepascal throws an AccessViolation on WinCE where the same code works on Win32.