cl-bzip2 -


BSD
跨平台
Lisp

软件简介

cl-bzip2 是 Common Lisp 实现 bzip2 压缩和解压缩的开发包。

压缩示例代码:

;;; Compression usage

;;; No values are returned if execution was successful
;;; Using pathnames
CL-USER> (bzip2:compress #p"test.txt" #p"test.txt.bz2")
; No value

;;; Using binary streams
CL-USER> (with-open-file (in "test.txt" :direction :input :element-type '(unsigned-byte 8))
           (with-open-file (out "test.txt.bz2" :direction :output :element-type '(unsigned-byte 8))
             (bzip2:compress in out)))
; No value

;;; Mixing stream and pathname
CL-USER> (with-open-file (in "test.txt" :direction :input :element-type '(unsigned-byte 8))
           (bzip2:compress in #p"test.txt.bz2"))
; No value