;; @module zlib.lsp ;; @description Functions for compression/decompression with zlib ;; @version 1.1 - comments redone for automatic documentation ;; @version 1.2 - new library detection routine ;; @version 1.3 - added lib for opnBSD and tested for 64-bit newLISP ;; @version 1.4 - doc changes ;; @version 1.5 - replaced write-buffer with write ;; @version 1.6 - removed broken squeeze and unsqueeze functions. ;; @version 1.7 - added library for CentOS 6 Linux ;; @version 1.71 - added library for Ubuntu Linux 12.04 and 13.04 ;; @version 1.72 - swap else-less 'if' for 'when' ;; @version 1.73 changes references to /usr/ to /usr/local/ ;; @author L.M 2006-2013 ;;
;; (load "/usr/local/share/newlisp/modules/zlib.lsp") ;; ; or shorter ;; (module "zlib.lsp") ;;(when (< (sys-info -2) 10110) (constant (global 'write) write-buffer)) (context 'zlib) (set 'files '( "/lib/i386-linux-gnu/libz.so.1" ; Ubuntu 13.04 "/usr/lib/x86_64-linux-gnu/libz.so" ; Ubuntu 12.04 LTS "/usr/lib/libz.so" ; Linux, BSD, Solaris "/usr/lib/libz.so.4.1" ; OpenBSD 4.6 "/usr/lib64/libz.so" ; for 64Bit CentOS 6 Linux "/usr/lib/libz.dylib" ; Mac OSX / Darwin "libz1.dll" ; MS Windows )) (set 'library (files (or (find true (map file? files)) (throw-error "cannot find zlib compression library")))) (import library "compress") (import library "uncompress") (import library "gzopen") (import library "gzread") (import library "gzclose") (import library "gzwrite") ;; @syntax (zlib:gz-read-file