home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / compress / 4141 < prev    next >
Encoding:
Internet Message Format  |  1992-12-14  |  1.5 KB

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