Use the source, see http://svn.freepascal.org/svn/fpc/tr...ib/paszlib.pas It is very much like the other zlib, you need little or no changes other than use the paszlib unit.