RedLZW:
Filter:
Classes (extension) | Red > redTools

RedLZW : Object
ExtensionExtension

lzw compression/decompression
Source: RedLZW.sc

Description

See http://en.wikipedia.org/wiki/LZW and http://marknelson.us/1989/10/01/lzw-data-compression/

A dictionary look-up compressor that performs well with both highly repetitive data and repeating patterns e.g. [0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 3, 3, 3, 3, 3, 3, 3, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3].

NOTE: Only works with 8bit Integer (0-255) values.

Class Methods

RedLZW.compress(input)

Expects an array of 8bit integers. Returns an array of integers.

RedLZW.decompress(input)

Array of integers. Returns an array of 8bit integers.

Inherited class methods

Instance Methods

Inherited instance methods

Examples