looking for fast (streaming) compression of a bitmap

Im trying to build a fast algorithm wich compresses a bitmap (color
depth*width*height) to say +- 1/2 its memory usage, counts the number of
different colors and stacks each unique color. It is ment to work with video
capturing, so preferably a one-pass algorithm (on the stream). The color
depth is maximum 24-bit and the captures are maximum 640x400 pixels.

Any ideas ?