Append the LEB128 (unsigned, little-endian base-128) encoding of `value`.
| 379 | |
| 380 | /// Append the LEB128 (unsigned, little-endian base-128) encoding of `value`. |
| 381 | void AppendLeb128(std::vector<uint8_t>& out, uint32_t value) { |
| 382 | std::array<uint8_t, bit_util::kMaxLEB128ByteLenFor<uint32_t>> buf = {}; |
| 383 | const auto n_bytes = |
| 384 | bit_util::WriteLEB128(value, buf.data(), static_cast<int32_t>(buf.size())); |
| 385 | ASSERT_GT(n_bytes, 0); |
| 386 | out.insert(out.end(), buf.data(), buf.data() + n_bytes); |
| 387 | } |
| 388 | |
| 389 | void AppendRleRun(std::vector<uint8_t>& bytes, std::vector<bool>& expected, bool value, |
| 390 | rle_size_t count) { |
no test coverage detected