Skip to content

📦 Lempel-Ziv Complexity, fast implementation in Julia, Open-Source (MIT) 👍 →

License

Notifications You must be signed in to change notification settings

Naereen/LempelZiv.jl

Repository files navigation

Julia implementation of Lempel-Ziv Complexity

This repository contains a small, simple and efficient implementation of the Lempel-Ziv complexity algorithm.

Examples

Simple usage

If the LempelZiv.jl file is accessible in your PATH or in Julia's path:

julia> import LempelZiv
julia> s = "1001111011000010"
julia> LempelZiv.lempel_ziv_complexity(s)  # 1 / 0 / 01 / 11 / 10 / 110 / 00 / 010
8

Documentation

See this file.

The documentation is generated with Documenter.jl but I don't master it very well yet. Sorry if the documentation is incomplete!

See this notebook: on nbviewever, which also shows the Python implementations.


Install and build

Manually ?

Easy!

Clone this repository, go in the folder, test, and if it works, use the src/LempelZiv.jl file.

$ cd /tmp/
$ git clone https://GitHub.com/Naereen/LempelZiv.jl
$ cd LempelZiv.jl/src/
$ julia LempelZiv.jl test     # should pass
$ # use this file if you want

With Pkg ?

This project is hosted on the METADATA.jl package repository.

$ julia
julia> Pkg.install("LempelZiv")  # should work
# now test it
$ julia -E "import LempelZiv; 6 == LempelZiv.lempel_ziv_complexity(\"1001111011000010\")"  # test

Python implementation ?

The Python 🐍 package is published here: Naereen/Lempel-Ziv_Complexity, and see here for its documentation.

lempel_ziv_complexity in pypi PyPI implementation PyPI pyversions


About

Language?

Julia version 0.5 at least.

📜 License ? GitHub license

MIT Licensed (file LICENSE). © Lilian Besson, 2017.

Maintenance Ask Me Anything ! Analytics

made-for-julia ForTheBadge uses-badges ForTheBadge uses-git ForTheBadge built-with-science