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