| 101 | } |
| 102 | |
| 103 | int64_t CountNulls(const std::vector<uint8_t>& valid_bytes) { |
| 104 | return static_cast<int64_t>(std::count(valid_bytes.cbegin(), valid_bytes.cend(), '\0')); |
| 105 | } |
| 106 | |
| 107 | Status MakeRandomByteBuffer(int64_t length, MemoryPool* pool, |
| 108 | std::shared_ptr<ResizableBuffer>* out, uint32_t seed) { |