A Clojure library that performs compression/decompression using LZ77 algorithm.
Include the library in your leiningen project dependencies:
[clj-lz77 "0.1.0"]
(use 'clj-lz77.core)
; to compress a file
(compress-file "/tmp/my-big-file.md" "/tmp/my-small-file.lz77")
; to decompress a file
(decompress-file "/tmp/my-small-file.lz77" "/tmp/my-big-file.md")
You can also use encode and decode functions that operate on a sequence level:
(use 'clj-lz77.encoder 'clj-lz77.decoder)
(def v [88 89 95 101 89 95 101 83 15])
; produces a lazy encoded sequence of bytes
(def e (encode v))
; produces a lazy decoded sequence of bytes
(def d (decode e))
(= v d) ; true, right?
Copyright © 2013 Pavel Prokopenko
Distributed under the Eclipse Public License, the same as Clojure.