https://github.com/propan/clj-lz77
an implementation of LZ77 compression algorithm written in Clojure
https://github.com/propan/clj-lz77
Last synced: 11 months ago
JSON representation
an implementation of LZ77 compression algorithm written in Clojure
- Host: GitHub
- URL: https://github.com/propan/clj-lz77
- Owner: propan
- Created: 2013-06-17T17:03:14.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2013-06-28T16:43:58.000Z (about 13 years ago)
- Last Synced: 2025-07-04T13:22:20.299Z (12 months ago)
- Language: Clojure
- Size: 406 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# clj-lz77
A Clojure library that performs compression/decompression using LZ77 algorithm.
## Usage
Include the library in your leiningen project dependencies:
```clojure
[clj-lz77 "0.1.0"]
```
## Examples
```clojure
(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:
```clojure
(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?
```
## License
Copyright © 2013 Pavel Prokopenko
Distributed under the Eclipse Public License, the same as Clojure.