pack bitmaps for improved memory use