zoom-cache-1.2.1.6: A streamable, seekable, zoomable cache file format

Portabilityunknown
Stabilityunstable
MaintainerConrad Parker <conrad@metadecks.org>
Safe HaskellSafe-Inferred

Data.ZoomCache.Numeric.Delta

Contents

Description

Delta encoding and decoding of numeric values.

Synopsis

Delta encoding

deltaEncode :: Num a => [a] -> [a]Source

Delta encode a list of numbers

 > deltaEncode [1,2,3,2,4]
 [1,1,1,-1,2]

deltaDecode :: Num a => [a] -> [a]Source

Delta-decode a list of numbers

 > deltaDecode [1,1,1,-1,2]
 [1,2,3,2,4]