views:

318

answers:

4

I've finished my current "part-time" project and am looking for something new.

I've decided to have a crack at writing my own compression / decompression utility. I'm not planning on selling it or anything - it's more for my own interest.

Preferably, it will be be in C# but Java or C is OK.

Can anyone suggest some good sources on compression / decompression techniques that I can study. Hopefully, some that don't involve maths at a doctorate level!

+5  A: 

A good book on this topic is The Data Compression Book. It starts off with the basics and ends up with JPEG and fractal image compression algorithms.

I worked through this whole book years ago (the first edition, I think) and I still remember it as a really rewarding experience.

Greg Hewgill
+2  A: 

This competition gives a good idea of the current state of the art for text compression, and something to aim for if you come up with something good!

I've found this a useful survey of lossless image compression.

If you read only one academic paper on the subject, make it C.E. Shannon's "A Mathematical Theory of Communication". The ideas there are absolutely fundamental to compression.

timday
+2  A: 

I find that Wikipedia is a pretty good source in this respect. See, for example, Huffman coding, LZW and Deflate for some common lossless general-purpose data compression algorithms.

If you want to do something more specific, the article on JPEG is also really good.

Thomas
A: 

This is completely not an answer, but....Compression and Decompression, for me, have never really been of high interest. There are compression classes in System.IO.Compression, and those things take care of it for me. What more do I need to know? If the built-in classes are not sufficient, there are third-party class libs.

(Actually, the DeflateStream and GZipStream classes in .NET exhibit anomalous behavior with previously-compressed data : they can actually increase the size of the data they are asked to compress. Whoops! It's been reported as a problem but the shot was deflected off of the Borg's shield: Connect.

Kudos to Microsoft for soliciting public bug reports; Bados on Microsoft for simply Closing bugs they didn't feel like fixing. )

Cheeso