Question: how does bmp compression work?
Answer: When the Compression member is BI_RLE4, the bitmap is compressed by using a run-length encoding format for a 4-bit bitmap, which also uses encoded and absolute modes: In encoded mode, the first byte of the pair contains the number of pixels to be drawn using the color indexes in the second byte.