From gobbel@cogsci.ucsd.edu Sat Jul 26 22:35:34 1997 Date: Sat, 26 Jul 1997 22:23:22 -0700
To: bnews@bbb.caltech.edu (BABEL news)
From: Randy Gobbel <gobbel@cogsci.ucsd.edu> Subject: Perl script to shrink GENESIS Postscript files

I started hacking on the code that GENESIS uses to generate Postscript files from graphs, and was able to get about a 95% size reduction in some of my files with some very simple checks. By that time I was on a roll, so I sat down and wrote the following Perl script, which post-processes GENESIS Postscript files, and which I believe gets them down to the minimum possible size. In my test case, the original file size was 2855900 bytes, which boiled down to just 34006 bytes after processing--almost a 99.9% size reduction!

The optimizations to the Postscript generation code will be included in upcoming versions of GENESIS, and although they don't optimize as much as this script, they do greatly reduce the size of the files produced.

Warning: this code is only intended for post-processing graphs produced by GENESIS. I doubt that it would work for other types of images, even those output by GENESIS.

Enjoy.

-Randy