Skip to content
Some LZ77 compression utilities for the handy hands-on developer in search for a few less bytes of I/O.
PHP Shell HTML Python Java JavaScript Other
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib Added Erlang, and it's a long way to go. Jan 20, 2011
src Add main method to java version Oct 27, 2018
.gitignore Add ignores Oct 27, 2018
LICENSE.txt Add proper readme and license files Sep 29, 2014
build.xml Split build and test targets Sep 29, 2014

LZ77 Kit

The lz77-kit is aimed at being another tool in the web-mans tool belt, enabling a simple and very pragmatic compression utility for various languages. It's perhaps not the sharpest compression-knife for heavy-duty cutting, but may suite some craft(wo)mens needs.

This could be a simple way for you to throttle down on some of that bandwidth usage, at least a few bytes or so. And a byte saved is a byte earned!

Currently features LZ77 implementations for the following languages:

  • JavaScript
  • PHP
  • Python
  • Java
  • Ruby
  • Erlang

Language wish-list

  • Go
  • OCaml
  • Haskell
  • Clojure
  • Swift
  • ObjectiveC

Are you missing a language? Please get involved and contribute!

Getting started

  1. Get the project source code
  2. Go to the project directory
  3. Test and build using Ant on the comand line.

To build and test all the current LZ77 implementation use the default build target:

shell$> ant

For more build information and project build targets, you may run:

shell$> ant -p

Look in the ./output folder for the built artifacts and copy/paste what you need. Please keep the license and credits in any generated source code or scripts.

Thank you!

A note on requirements

Being a project with such a broad programming language base, the requirements are more or less dependent on your target build platform. It's of course only possible to do a complete build if all programming languages are installed on that system.

I've lately had success building the project using the following:

  • Ant 1.9.4
  • PHP 5.4.30
  • Java 1.8.0
  • Python 2.7.5
  • Ruby 2.0.0p481
  • Erlang/OTP 17

Oh, and by the way, my shell have slashes that slant "the right way" (/).


The most source code have unit tests and the project is pretty independent, or free from third party dependencies, so it should be easy for any developer, with a decent environment, to clone and and start working with the code.


  • Try to keep the self-dependent structure, add libs and dependencies into the project but be very sparse.

  • Write tests and wire them to work with the Ant build.xml buildfile.

  • Keep implementations simple and open to copy/paste (e.g. no packages or namespaces if possible).

  • Code with joy, not in anger!

This is all done with the hope of being of use to someone out there.

You can’t perform that action at this time.