Bitmap Data Compression

When a data block is not compressed, Essbase uses 8 bytes to store every nonmissing cell (cells with data values). Essbase also uses a 72-byte block header for each block, whether or not the block is compressed.

With bitmap compression, Essbase uses a bitmap to represent data cells and stores only the bitmap, the block header, and the other control information. A bitmap uses one bit (represented as “1” or “0”) for each cell in the data block, whether the cell value is missing (“0”) or nonmissing (“1”). Therefore, the bitmap scheme provides a fixed overhead for data compression.

When using bitmap compression, Essbase stores only nonmissing values and does not compress repetitive values or zeros (contrast with RLE compression, described in RLE Data Compression). When Essbase places a data block into the data cache, it fully expands the data block, using the bitmap to recreate the missing values.

The following is a representation of a portion of an uncompressed data block, with eight cells (cells 1–4 in the first row and cells 5–8 in the second row). In the first row, the data values are: 25, #MISSING, #MISSING, and #MISSING. In the second row, the data values are: #MISSING, 16, 7, and #MISSING.

Uncompressed data block

25         #MISSING   #MISSING   #MISSING
#MISSING   16         7          #MISSING

When the data block is fully expanded in memory, Essbase uses 64 bytes (8 bytes * 8 cells). When the data is stored uncompressed on disk, Essbase uses 24 bytes (8 bytes * 3 cells with data—cells 1, 6, 7).

When the data is stored compressed on disk, Essbase uses 1 byte (1 bit * 8 cells; 8 bits = 1 byte) to store the bitmap. The following is a representation of the bitmap of the uncompressed data block described above:

Bitmap of compressed data block

1          0          0          0
0          1          1          0

In most cases, bitmap compression conserves disk space more efficiently. However, much depends on the configuration of the data.