码迷,mamicode.com
首页 > 其他好文 > 详细

Concise: Compressed ’n’ Composable Integer Set

时间:2014-10-07 00:38:40      阅读:139      评论:0      收藏:0      [点我收藏+]

标签:blog   http   io   os   ar   sp   2014   c   on   

Word Aligned Hybrid (WAH) bitmap compression

bubuko.com,布布扣

下面是:Concise: Compressed ’n’ Composable Integer Set

bubuko.com,布布扣

 

Figure 2 shows an example of CONCISE-compressed bitmap
made up of 5 words. Words #0, #3, and #5 are literal words
where, similarly to WAH, the leftmost bit indicates the block
type (‘1’), while the remaining bits are used to represent an uncompressed
31-bit block. Words #1, #2, and #4 are fill words:
the first (leftmost) bit is the block type (‘0’), the second bit is
the fill type (a sequence of 0’s or 1’s), the following 5 bits are
the position of a “flipped” bit within the first 31-bit block of the
fill, and the remaining 25 bits count the number of 31-blocks
that compose the fill minus one. When position bits equal 0
(binary ‘00000’), the word is a “pure” fill, similar to that of
WAH. Otherwise, position bits indicate the bit to switch (from
0 to 1 in a sequence of 0’s, or from 1 to 0 in a sequence of 1’s)
within the first 31-bit block of the sequence represented by the
fill word. That is, 1 (binary ‘00001’) indicates that we have to
flip the rightmost bit, while 31 (binary ‘11111’) indicates that
we have to flip the leftmost one. If we consider bitmaps as a
representation of integer sets, in Figure 2 Words #2 indicates
that integers in the range 94–1022 are missing, but 93 is in the
set since position bits say that the first number of the “missing
numbers” sequence is an exception.

 

Concise: Compressed ’n’ Composable Integer Set

标签:blog   http   io   os   ar   sp   2014   c   on   

原文地址:http://www.cnblogs.com/lpthread/p/4008752.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!