| 125 | } |
| 126 | |
| 127 | Expect<void> WriteU64(std::ostream &OS, uint64_t Data) noexcept { |
| 128 | do { |
| 129 | uint8_t Byte = static_cast<uint8_t>(Data & UINT64_C(0x7f)); |
| 130 | Data >>= 7; |
| 131 | if (Data > UINT64_C(0)) { |
| 132 | Byte |= UINT8_C(0x80); |
| 133 | } |
| 134 | WriteByte(OS, Byte); |
| 135 | } while (Data > UINT64_C(0)); |
| 136 | return {}; |
| 137 | } |
| 138 | |
| 139 | Expect<void> WriteName(std::ostream &OS, std::string_view Data) noexcept { |
| 140 | WriteU32(OS, static_cast<uint32_t>(Data.size())); |
no test coverage detected