Lines Matching refs:bytes
27 inline void AppendBytes(std::vector<uint8_t>& bytes, T data) { in AppendBytes() argument
28 size_t size = bytes.size(); in AppendBytes()
29 bytes.resize(size + sizeof(T)); in AppendBytes()
30 memcpy(bytes.data() + size, &data, sizeof(T)); in AppendBytes()
33 inline void Append1BE(std::vector<uint8_t>& bytes, uint8_t value) { in Append1BE() argument
34 bytes.push_back(value); in Append1BE()
37 inline void Append2BE(std::vector<uint8_t>& bytes, uint16_t value) { in Append2BE() argument
38 AppendBytes<uint16_t>(bytes, htobe16(value)); in Append2BE()
41 inline void Append4BE(std::vector<uint8_t>& bytes, uint32_t value) { in Append4BE() argument
42 AppendBytes<uint32_t>(bytes, htobe32(value)); in Append4BE()
45 inline void Append8BE(std::vector<uint8_t>& bytes, uint64_t value) { in Append8BE() argument
46 AppendBytes<uint64_t>(bytes, htobe64(value)); in Append8BE()
49 inline void AppendUtf16BE(std::vector<uint8_t>& bytes, const uint16_t* chars, size_t char_count) { in AppendUtf16BE() argument
50 Append4BE(bytes, char_count); in AppendUtf16BE()
52 Append2BE(bytes, chars[i]); in AppendUtf16BE()
56 inline void AppendUtf16CompressedBE(std::vector<uint8_t>& bytes, in AppendUtf16CompressedBE() argument
59 Append4BE(bytes, char_count); in AppendUtf16CompressedBE()
61 Append2BE(bytes, static_cast<uint16_t>(chars[i])); in AppendUtf16CompressedBE()