'what is lempel-ziv stac compression technique ? LZS

I hope to find my answer here its been a long days searching for a clear answer

I am work on lempel-ziv stac compression technique ! LZS and looking for the Algorithm that been used in this method of compression
what I found until now is others method such as LZH , LZW .. but not LZS

for more information about LZS check this links;

http://everything2.com/title/Stac+%2528LZS%2529
http://scientopia.org/blogs/goodmath/2008/01/07/simple-lempel-ziv-compression-in-erlang/

I found a script that decompress binary file which encoded by LZS here:

h**p://filippo.io/decompressing-lempel-ziv-stac-in-python/

I couldn't understand this script , how it work ?

my questions is :

what's LZS compression Algorithm ?

How could I read binary file coded by LZS ( decompression method )?

Regards



Solution 1:[1]

You can find LZS documented in ANSI X3.241-1994. The format is quite simple. A 0 bit indicates that the next eight bits are just a literal byte. A 1 bit indicates either a string to copy from the previous data or the end of the compressed data depending on the subsequent bits. The 1 bit is followed by an offset field of either 8 or 12 bits, and that is followed by a length field of variable length of 2, 4, 8, 12, etc. bits depending on the length. Or the 1 is followed by a specific 9-bit end marker.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1