| 768 | } |
| 769 | |
| 770 | static rocksdb::Status GetBitfieldInteger(const ArrayBitfieldBitmap &bitfield, uint32_t bit_offset, |
| 771 | BitfieldEncoding enc, uint64_t *res) { |
| 772 | if (enc.IsSigned()) { |
| 773 | auto status = bitfield.GetSignedBitfield(bit_offset, enc.Bits()); |
| 774 | if (!status) { |
| 775 | return rocksdb::Status::InvalidArgument(); |
| 776 | } |
| 777 | *res = status.GetValue(); |
| 778 | } else { |
| 779 | auto status = bitfield.GetUnsignedBitfield(bit_offset, enc.Bits()); |
| 780 | if (!status) { |
| 781 | return rocksdb::Status::InvalidArgument(); |
| 782 | } |
| 783 | *res = status.GetValue(); |
| 784 | } |
| 785 | return rocksdb::Status::OK(); |
| 786 | } |
| 787 | |
| 788 | static rocksdb::Status CopyBitfieldBytesToSegments(engine::Context &ctx, Bitmap::SegmentCacheStore &store, |
| 789 | const ArrayBitfieldBitmap &bitfield, uint32_t byte_offset, |
no test coverage detected