[comp.lang.postscript] Data Compression

daveg@coho.ee.ubc.ca (Dave Gagne) (09/14/90)

I would like to create a postscript procedure that takes a compressed
image and decompresses it on the printer.  I created the plain vanilla
(uncompressed) version, shown below, but being a novice at postscript
I'm having trouble with the decompression routine.  I assume this has
been done before, so can anyone give me a hand or supply me with 
an example that I can use as a guide?

I'm not a subscriber yet so could you respond to me directly.

Thanks
Andrew
scott@cmc.ca

%!
%%Postscript raster image generated from CIF 
/Courier findfont 12 scalefont setfont
initgraphics
0 setlinewidth
/picstr 600 string def
gsave
  18 54 translate
  576 720 scale
  0 setgray
  2400 3000 true
  [2400 0 0 -3000 0 3000]
  {currentfile picstr readhexstring pop}
  imagemask
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
<more data>

grestore
18 36 moveto
(          Thu Sep 13 15:38:16 1990
) show
18 18 moveto
(          Plot Bounds: <-4375,-2022> to <292,1958> microns   (flipped)
) show
showpage


+---------------------------------------------------------------------------+
|  Dave Gagne.              UBC VLSI Salmon Net       o    /\        /\     |
|                                               _____   o    \      /  \    |
|  daveg@fs1.ee.ubc.ca                        \/    o\_o      \    /    \   | 
|  ...!ubc-cs!fs1.ee.ubc.ca!daveg             /\_____/         \  /      \  |
|                                                               \/        \ |
+---------------------------------------------------------------------------+