19 #ifndef HELPER_FUNCTIONS__BYTE_READER_HPP_
20 #define HELPER_FUNCTIONS__BYTE_READER_HPP_
30 namespace helper_functions
36 const std::vector<uint8_t> & byte_vector_;
42 explicit ByteReader(
const std::vector<uint8_t> & byte_vector)
43 : byte_vector_(byte_vector),
53 constexpr std::size_t kTypeSize =
sizeof(T);
56 uint8_t byte_vector[kTypeSize];
59 for (std::size_t i = 0; i < kTypeSize; ++i) {
60 tmp.byte_vector[i] = byte_vector_[index_ + kTypeSize - 1 - i];
68 void skip(std::size_t count)
77 #endif // HELPER_FUNCTIONS__BYTE_READER_HPP_