ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen)); /* Compresses the source buffer into the destination buffer. sourceLen is the byte length of the source buffer. Upon entry, destLen is the total size of the destination buffer, which must be at least the value returned by compressBound(sourceLen). Upon exit, destLen is the actual size of the compressed buffer. This function can be used to compress a whole file at once if the input file is mmap'ed. compress returns Z_OK if success, Z_MEM_ERROR if there was not enough memory, Z_BUF_ERROR if there was not enough room in the output buffer. */ define C-function zlib-compress parameter destination :: ; parameter destination-length :: ; parameter source :: ; parameter source-length :: ; result return-code :: ; c-name: "compress" end; define C-function zlib-compress-bound parameter source-length :: ; result return-code :: ; c-name: "compressBound" end; define function main (name, arguments) let foo = "asdhalsdhald asldhlasdjasda sdajsdbajkd;bhdk bhadjkaSDBASd ujwheiqecvuhxohero"; let bar = make(, value: ""); let bar-size :: = make(, value: zlib-compress-bound(size(foo))); format-out("return-code: %d\n", zlib-compress(bar, bar-size, foo, size(foo))); exit-application(0); end function main;