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++.