compressed-3.0.0.1: Compressed containers and reducers

Portabilityportable
Stabilityexperimental
Maintainerekmett@gmail.com
Safe HaskellNone

Data.Compressed.RunLengthEncoding

Description

Compression algorithms are all about exploiting redundancy. When applying an expensive Reducer to a redundant source, it may be better to extract the structural redundancy that is present. Run length encoding can do so for long runs of identical inputs.

Synopsis

Documentation

newtype RLE a Source

A Generator which supports efficient mapReduce operations over run-length encoded data.

Constructors

RLE 

Fields

getRLE :: FingerTree Count (Run a)
 

Instances

data Run a Source

A single run with a strict length

decode :: RLE a -> [a]Source

encode :: (Generator c, Eq (Elem c)) => c -> RLE (Elem c)Source

recode :: Eq a => RLE a -> RLE aSource

toRuns :: RLE a -> [Run a]Source

fromRuns :: [Run a] -> RLE aSource