About

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 / 1110 / 1100 / 0010
6

Documentation

See this file.

Demo on a Jupyter notebook

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 :snake: 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.

:scroll: License ? GitHub license

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

Maintenance Ask Me Anything ! Analytics

ForTheBadge uses-badges ForTheBadge uses-git

forthebadge made-with-julia ForTheBadge built-with-science