Article View: comp.lang.postscript
Article #1898Re: PS L2 compression behavior
From: Tom Lane
Date: Tue, 08 Sep 1992 22:49
Date: Tue, 08 Sep 1992 22:49
25 lines
1854 bytes
1854 bytes
taft@adobe.com (Ed Taft) writes: > dmlaur@ernie.Princeton.EDU (David M. Laur) writes: > >Secondly, is there something wonderfully magic about the number 85 > >that makes the encoding algorithm Very Easy(tm)? > > I'm not aware of any tricks that apply specifically to multiplying and > dividing by 85. The choice of 85 as a base derives from it being the > smallest integer n such than n^5 >= 2^32. No, 85 is not particularly easy, it's just the largest "safe" value for this application. Base-85 representation is customarily used for representing arbitrary binary files as ASCII text so that they can be mailed around on Usenet. It happens that there are 85 printable ASCII characters that have exact EBCDIC equivalents. If you try to use all 95 ASCII characters, you run the risk of your file getting mangled in an ASCII <=> EBCDIC conversion performed by some mail gateway. (And of course, using any ASCII control characters or characters with the 8th bit set is hopeless...) At least, that was *my* understanding of the design. The fact that 5 base-85 characters can represent 32 bits is convenient but it's not really the driving force. regards, tom lane ps: any further discussion should probably move to comp.compression.
Technical Details
Message-ID:
<BuA7Es.Ltu.2@cs.cmu.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!dtix!darwin.sura.net!spool.mu.edu!uwm.edu!ogicse!das-news.harvard.edu!cantaloupe.srv.cs.cmu.edu!tglReferences:
<1992Sep8.143846.3667@Princeton.EDU> <1992Sep8.205244.17495@adobe.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!dtix!darwin.sura.net!spool.mu.edu!uwm.edu!ogicse!das-news.harvard.edu!cantaloupe.srv.cs.cmu.edu!tgl From: tgl+@cs.cmu.edu (Tom Lane) Newsgroups: comp.lang.postscript Subject: Re: PS L2 compression behavior Keywords: PostScript compression rle pathological Message-ID: <BuA7Es.Ltu.2@cs.cmu.edu> Date: 8 Sep 92 22:49:39 GMT References: <1992Sep8.143846.3667@Princeton.EDU> <1992Sep8.205244.17495@adobe.com> Sender: news@cs.cmu.edu (Usenet News System) Organization: School of Computer Science, Carnegie Mellon Lines: 25 Nntp-Posting-Host: g.gp.cs.cmu.edu