home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / compress / 3758 < prev    next >
Encoding:
Internet Message Format  |  1992-11-08  |  2.2 KB

  1. Path: sparky!uunet!mcsun!sun4nl!ruuinf!accucx!nevries
  2. From: nevries@accucx.cc.ruu.nl (Nico E de Vries)
  3. Newsgroups: comp.compression
  4. Subject: Re: bitmap compression
  5. Message-ID: <3297@accucx.cc.ruu.nl>
  6. Date: 7 Nov 92 16:46:38 GMT
  7. References: <Bx9C19.4r2@ccu.umanitoba.ca> <1992Nov6.092342.25648@netcom.com>
  8. Organization: Academic Computer Centre Utrecht
  9. Lines: 46
  10.  
  11. Somehow the origioal mail didn't arive at my site (happens often)
  12. therefor I reply to a reply.
  13.  
  14. >umfehr06@ccu.umanitoba.ca (John Fehr) writes:
  15.  
  16. >>I'm currently looking for compression algorithms to compress weather charts.
  17. >>These charts contain about 95% white pixels, and 5% black pixels.  I've
  18. >>already thought of using GIF, but the files only shrink down to ~100k.
  19. >>(Originally ~1meg uncompressed.)  I've also thought of using arithmetic
  20. >>coding.  Does anyone have any suggestions as to other compression methods?
  21. >>  Thanx for your help,
  22. >>    John
  23.  
  24.  
  25. Your problem is excactly the same as compressing FAX messages. FAX also
  26. is a lot of white with some black now and then. What you should do
  27. is a two step tranformation. First you define a dictionary of variable
  28. length strings. This should be like:
  29.  
  30. A = 1
  31. B = 11
  32. C = 0
  33. D = 00
  34. E = 000
  35. F = 0000
  36. G = 000000
  37. H = 000000000
  38. etc.
  39. Some experimenting to get the optimal set might be needed. Looking at
  40. the FAX compression specs (CCITT) might help.
  41.  
  42. The first step of compressing is transforming the file into these symbols.
  43. You try to get as low as possible symbols. This is not very hard to do:
  44. Count the length of a string and encoding it in these symbols.
  45.  
  46. These symbols can then be encoded with Huffman a standard compression
  47. algo. Depending on wanted speed and consistency of the data you can
  48. use static or dynamic Huffman compression.
  49.  
  50. Nico E. de Vries  (nevries@cc.ruu.nl) |------------------*   AA   III  PPP
  51. _ This text is supplied AS IS, no warranties of any kind |  A  A   I   P  P
  52. | apply. No rights can be derived from this text. This   |  AAAA   I   PPP
  53. | text is likely to contain spelling and grammar errors. |  A  A   I   P
  54. *---------------------------( Donate to GreenPeace! )----*  A  A  III  P
  55.  
  56. "The IBM PC is still waiting for a version of the CP/M OS.", G.M. Vose, 1982.
  57.