🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #3095

Data Compression

#3095
From: Dave Gagne
Date: Thu, 13 Sep 1990 20:37
49 lines
2132 bytes
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             /\_____/         \  /      \  |
|                                                               \/        \ |
+---------------------------------------------------------------------------+
Technical Details
Message-ID: <1407@fs1.ee.ubc.ca>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!hellgate.utah.edu!dog.ee.lbl.gov!ucsd!swrinde!zaphod.mps.ohio-state.edu!samsung!uunet!zephyr.ens.tek.com!uw-beaver!ubc-cs!fs1!coho.ee.ubc.ca!daveg

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!hellgate.utah.edu!dog.ee.lbl.gov!ucsd!swrinde!zaphod.mps.ohio-state.edu!samsung!uunet!zephyr.ens.tek.com!uw-beaver!ubc-cs!fs1!coho.ee.ubc.ca!daveg
From: daveg@coho.ee.ubc.ca (Dave Gagne)
Newsgroups: comp.lang.postscript
Subject: Data Compression
Keywords: data,compression
Message-ID: <1407@fs1.ee.ubc.ca>
Date: 13 Sep 90 20:37:45 GMT
Sender: root@fs1.ee.ubc.ca
Reply-To: scott@cmc.ca
Lines: 49