1 ! Copyright (C) 2009 Doug Coleman.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: alien alien.c-types alien.syntax combinators system
5 IN: compression.zlib.ffi
8 { [ os winnt? ] [ "zlib1.dll" ] }
9 { [ os macosx? ] [ "libz.dylib" ] }
10 { [ os unix? ] [ "libz.so" ] }
11 } cond "cdecl" add-library >>
16 CONSTANT: Z_STREAM_END 1
17 CONSTANT: Z_NEED_DICT 2
19 CONSTANT: Z_STREAM_ERROR -2
20 CONSTANT: Z_DATA_ERROR -3
21 CONSTANT: Z_MEM_ERROR -4
22 CONSTANT: Z_BUF_ERROR -5
23 CONSTANT: Z_VERSION_ERROR -6
29 FUNCTION: int compress ( Bytef* dest, uLongf* destLen, Bytef* source, uLong sourceLen ) ;
30 FUNCTION: int compress2 ( Bytef* dest, uLongf* destLen, Bytef* source, uLong sourceLen, int level ) ;
31 FUNCTION: int uncompress ( Bytef* dest, uLongf* destLen, Bytef* source, uLong sourceLen ) ;