-
WAH (word-aligned hybrid), efficient bitmap index compressAlgorithm 2020. 12. 6. 17:21728x90
WAH(word-aligned hybrid) is very efficent way to compress bitmap index. Of course we have another compression methods, but WAH compressed bitmap can be used to logcial operation without decompression, while other methods requrie decompression before we do any logical operatoin.
Summary of WAH
WAH compression is done in 32bit, both 31 and 30 bits are special meaning like below.
31 bit : Indicates literal(0) or fill(1)
30 bit : fill by(0) or by(1)
29 bit ~ 0 bit : just data bits like unsiged integer31bit 🠗 00xxxxxx xxxxxxxx xxxxxxxx xxxxxxxx 🠕 30 bit
Example1
There are four 32bit groups and two 32bit are filled by 0
1st 32bit 2nd 32bit 3rd 32bit 4th 32bit 31-bitgroups 40000380 00000000 00000000 001FFFFF WAH compressed 40000380 80000002 001FFFFF Decomposed 0x80000002
Please see to know how 31 and 30 bits are used in WAH
31 bit 1 / 30 bit 0 just 0 just 0 means 2 10000000 00000000 00000000 00000010 31 bit 1, so this 32 bit are fill
30 bit 0, so 32 bit are filed by 0
29 ~ 0 bit, it is 2.Therefore, two 32bit are filed by 0
https://youtu.be/BsZJ51JoYU0Very facny explanation of WAH
#References
728x90'Algorithm' 카테고리의 다른 글
How to setup Java, JUnit, gradle and Intellij, for PS (0) 2021.01.03 Algorithm / Tree (0) 2020.09.13 WAH(word aligned hybrid) links (0) 2020.09.06 Bitmap index에서 WAH 사용시 장점 (0) 2020.09.06