1 {-
    2  - Uncompress.hs
    3  - 
    4  - This program is a version of the compress utility as defined in
    5  - "A Technique for High Performance Data Compression", Terry A. Welch,
    6  - Computer, vol 17, no 6 1984, pp 8-19
    7  -
    8  -
    9  - Paul Sanders, Systems Research Division, British Telecom Laboratories 1992
   10  -
   11  -}
   12 
   13 module Uncompress (main) where
   14 
   15 import Defaults
   16 import BinConv    -- binary conversion routines
   17 import Decode     -- decoding routines
   18 
   19 main = getContents >>= \ inp ->
   20         putStr (uncompress inp)
   21 
   22 {- To uncompress a string we first convert the characters to n-bit binaries
   23  - and then to decimals which can then be decoded.
   24  -}
   25 
   26 uncompress = decode . ascii_to_codes . map fromEnum