Bitmap compression depends on the compression algorithm you want to compress the image with. Lossy and Lossless compression algorithms are used for compressing an image. In lossy technique image looses some of its information but most of the time this loss can not be identified by human eye. In lossless technique the image preserves its original information after the compression/decompression.
I have found some of the compression algorithms and their implementation in C++.
http://www.codeguru.com/cpp/g-m/bitmap/compressing/article.php/c4929/ Run length encoding in MFC C++ programming.
http://www.codeproject.com/KB/recipes/HandyHuffmanCoding.aspx Huffman coding technique for image compression using C++.
Also here is a small C program for Run Length Coding.
Here are C/C++ image compression libraries. http://www.pegasusimaging.com/clibraries.htm