Constructing sub-key index, see: https://kvrocks.apache.org/community/data-structure-on-rocksdb#bitmap-sub-keys-values The value is also equal to the offset of the bytes in the bitmap.
| 92 | // https://kvrocks.apache.org/community/data-structure-on-rocksdb#bitmap-sub-keys-values |
| 93 | // The value is also equal to the offset of the bytes in the bitmap. |
| 94 | uint32_t SegmentSubKeyIndexForBit(uint32_t bit_offset) { |
| 95 | return (bit_offset / kBitmapSegmentBits) * kBitmapSegmentBytes; |
| 96 | } |
| 97 | |
| 98 | rocksdb::Status Bitmap::GetMetadata(engine::Context &ctx, const Slice &ns_key, BitmapMetadata *metadata, |
| 99 | std::string *raw_value) { |