Common Lisp 實現 bzip2 壓縮和解壓縮的開發包 - cl-bzip2

jopen 12年前發布 | 67K 次閱讀 Lisp 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

項目主頁:http://www.baiduhome.net/lib/view/home/1328152602437

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!