PLEROS / SCIENTIFIC COMPUTING

Lempel–Ziv
sequence analysis.

Measure randomness, correlations across scales and similarity in symbolic data.

lzcomplexity brings entropy density, effective measure complexity and information distance to Python, Rust and standalone command-line tools.

pip install lzcomplexity

Open source · MIT licensed · Python + Rust

Binary LZ76 factors: 1·0·001·1001·1101. Curved arrows alternate above and below each factor. The highlighted prefix 100 crosses earlier factor boundaries; 1001 is new.
Read the factorization example

THE MEASURES

Randomness, structure and similarity.

Use h to study the production of new information, E to examine organization across ranges, and d to compare sequences.

Learn to interpret the results

INTERACTIVE PLAYGROUND

Explore your own sequences.

Paste a sequence, choose an example and explore what changes.

Runs on your device
6 / 256 bytes
Examples
Each input is limited to 256 UTF-8 bytes.

Start with banana to see the factor boundaries, or try a longer example to explore E.

banana
3LZ76 count
0.8155Entropy density h · base 3

The final copied tail is excluded from the reported count. Short-sequence estimates of h can exceed one.

UTF-8 byte analysis · automatic logarithm base 3 · Python cheatsheet ↗

PYTHON, RUST AND THE COMMAND LINE

Analyze a sequence.
Compare a collection.

Factor a sequence, estimate its entropy density, explore effective measure complexity and compare it with another sequence. One Rust core powers all three interfaces.

analysis.py
import lzcomplexity as lz

sequence = "00010111" * 256
result = lz.lz76(
    sequence,
    log_base=2,
    max_block_size=16,
)

print(result["h"])
print(result["emc"]["value"])
print(lz.nid(sequence, "01010101" * 256))
pip install lzcomplexity Python ≥ 3.9

FROM SYMBOLS TO SCIENCE

Research applications.

Use symbolic representations to study information in experimental signals, biological sequences and nonlinear dynamics.

DOCUMENTATION

Guides and
API reference.

Installation, worked examples, detailed function and command references, and compact usage cheatsheets.