home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.compression:4141 comp.lang.pascal:7440
- Newsgroups: comp.compression,comp.lang.pascal
- Path: sparky!uunet!spool.mu.edu!sdd.hp.com!ux1.cso.uiuc.edu!news.cso.uiuc.edu!s.psych.uiuc.edu!amead
- From: amead@s.psych.uiuc.edu (Alan Mead)
- Subject: Re: LZW or Run-length compression source code
- References: <92348.151232TAMGC@CUNYVM.BITNET>
- Message-ID: <Bz8GHC.6ys@news.cso.uiuc.edu>
- Sender: usenet@news.cso.uiuc.edu (Net Noise owner)
- Organization: UIUC Department of Psychology
- Date: Mon, 14 Dec 1992 04:58:23 GMT
- Lines: 22
-
- <TAMGC@CUNYVM.BITNET> writes:
-
- >A program I wrote in Pascal,generates a binary output file (File of byte),
- >which contains a lot of consecutive 0's and 1's. I would like to compress
- >this file using LZW or run-length coding. Does anybody know where I can
- >find source code in Pascal to do this compression/decomression for me?
-
- Run length encoding is, IMHO, easier to understand and code (especially
- in vanilla Pascal). Kernighan & Plauger's book _Software Tools in
- Pascal_ (ISBN 0201103427) has code starting on page 37. If you happen
- to be using Turbo Pascal, BTW, you may be able to *very significantly*
- increase the efficiency of their code (at the cost of any hope of
- posting it) by reading more than one byte at a time, etc.
-
- LZ encoding is rather more demanding (also IMHO) but there used to be a
- couple versions IN TURBO PASCAL (ie, using TP extentions) in the source
- (/src?) directory at garbo (128.214.87.1). I believe I still have it if
- it has left garbo's safekeeping.
-
- Happy computing.
-
- -alan
-