| 45 | |
| 46 | template <class BitmapWriter> |
| 47 | void WriteVectorToWriter(BitmapWriter& writer, const std::vector<int> values) { |
| 48 | for (const auto& value : values) { |
| 49 | if (value) { |
| 50 | writer.Set(); |
| 51 | } else { |
| 52 | writer.Clear(); |
| 53 | } |
| 54 | writer.Next(); |
| 55 | } |
| 56 | writer.Finish(); |
| 57 | } |
| 58 | |
| 59 | void BitmapFromVector(const std::vector<int>& values, int64_t bit_offset, |
| 60 | std::shared_ptr<Buffer>* out_buffer, int64_t* out_length) { |