如果我们要构建一个只用于查找的倒排表,我们就不需要存储最后一比特的位置。
If we are building an inversion list for searching only, we do not need to store the position of the last bit.
我们存储的是,开始出现1的位置,开始出现0的位置,然后再是出现1的位置,如此重复直到比特串结束。
All we store is the start position of the 1s, then the start position of the 0s, then the position of 1s again, and so on until the bit string is over.
不过,如果我们想要通过倒排表构造出原始的数据,我们必须要知道在哪里停止增加新的比特,这时就需要存储最后一比特的位置。
If, however, we want to construct the full original data, we need to know where to stop adding bits.
应用推荐