https://www.opasquet.fr/lempel-ziv-welch/
Lzw (Lempel–Ziv–Welch) is used to compress data in zip. It is an algorithm used to perform lossless data compression. It has been under development since either 1996 or 1998 by Igor Pavlov and was first used in the 7z format of the 7-Zip archiver. Very useful with markovian and grammar based discrete models. It encodes and decoding allowing multi-scale recursive segmentation of data structures. This is can be used to extend pseudo-repetitive sequences from a dictionary of multi-scalar repetitions observed in an initial sequence. The initial idea applied for music comes from an article and a documention written by Olivier Lartillot, Shlomo Dubnov, Gérard Assayag and Gill Bejerano: the Open Music LZ 2.2 Library in 2001 and the 2012 LZ Automatic Modeling of Musical Style. Open Music is a composition software. This tool was used for a piece within the Flucoma project and "The Keys to the Kingdom" installation.
Explanation and tests here: https://www.opasquet.fr/jtol_lzw/
Needed: Max 8.1.3, bach 0.8.1 and Jtol. The bach version directly available from the Max Package manager may cause problems.