home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / mac / programm / 14989 < prev    next >
Encoding:
Text File  |  1992-09-03  |  1.4 KB  |  36 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!sun-barr!ames!data.nas.nasa.gov!taligent!keith@taligent.com
  3. From: keith@taligent.com (Keith Rollin)
  4. Subject: Re: Best text compression?
  5. Message-ID: <Bu1L4L.1ps@taligent.com>
  6. Sender: usenet@taligent.com (More Bytes Than You Can Read)
  7. Organization: Taligent
  8. References: <1992Sep3.214518.9599@mnemosyne.cs.du.edu> <71986@apple.Apple.COM>
  9. Date: Fri, 4 Sep 1992 07:07:32 GMT
  10. Lines: 24
  11.  
  12. In article <71986@apple.Apple.COM>, anderson@Apple.COM (Clark Anderson) writes:
  13. > agoates@nyx.cs.du.edu (Alan Goates) writes:
  14. > >Second, does anyone know what the best published (Public Domain) algorithm is
  15. > >for compressing text. And does anyone know where I could get my hands on 
  16. > >examplesource code for said algorithm (The only one I've seen is Lempel-Ziv).
  17. > I have gotten pretty good compression on text using
  18. > a Huffman algorithm. It's pretty easy to implement,
  19. > any standard book on compression schemes should
  20. > have it.
  21.  
  22. I've never tried this myself, but someone once told me that you can get really
  23. good compression if you use a Huffman algorithm applied at the word level.
  24. Instead of counting and ranking all of the letters in the document, count the
  25. distinct words and treat each one like a single letter. This means that oft used
  26. words like "the" or "MicroSoftWord5.0Sucks" will compress down to 3 or 4 bits
  27. for the entire word.
  28.  
  29. --
  30. Keith Rollin
  31. Phantom Programmer
  32. Taligent, Inc.
  33.  
  34.