🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #1891

PS L2 compression behavior

#1891
From: David M. Laur
Date: Tue, 08 Sep 1992 14:38
32 lines
1758 bytes
I've written a pbm+ to eps filter which allows optional
PostScript Level 2 image encoding. Since the thing is now
functional, I'm looking for ways to make it faster, more
correct, and generally cooler. 

I have one specific question about data expansion resulting
from 'compressed' encoding of worst-case input files: am I correct
in computing the worst case expansion of an input file under
RunLengthEncode followed by ASCII85Encode to be

   (worst output size) = (input data size) (4/3) (5/4)


i.e.  for data of the form "abbabbabbabb ..." the RLE algorithm
requires two bytes for each 'a' (right?), and Ascii85 is a 5:4
encoding.


Secondly, is there something wonderfully magic about the number 85
that makes the encoding algorithm Very Easy(tm)?  So far, I've just
been doing brute force integer divide/remainders by the various powers
of 85.

Thanks for any insight!

--

David Laur                                It is absurd to divide people
Princeton University                      into good and bad; people are
Interactive Computer Graphics Lab         either charming or tedious.
dmlaur@princeton.edu                                - Oscar Wilde
Technical Details
Message-ID: <1992Sep8.143846.3667@Princeton.EDU>
Path: arc1-ca.pugleaf.net!sparky!uunet!gatech!darwin.sura.net!jvnc.net!princeton!ernie.Princeton.EDU!dmlaur

Show Full Headers
Complete Article Headers
Newsgroups: comp.lang.postscript
Path: arc1-ca.pugleaf.net!sparky!uunet!gatech!darwin.sura.net!jvnc.net!princeton!ernie.Princeton.EDU!dmlaur
From: dmlaur@ernie.Princeton.EDU (David M. Laur)
Subject: PS L2 compression behavior
Message-ID: <1992Sep8.143846.3667@Princeton.EDU>
Summary: what is worst case expansion?
Originator: dmlaur@ernie.Princeton.EDU
Keywords: PostScript compression rle pathological
Sender: news@Princeton.EDU (USENET News System)
Nntp-Posting-Host: ernie.princeton.edu
Organization: Princeton University
Date: Tue, 8 Sep 1992 14:38:46 GMT
Lines: 33