MCPcopy Create free account
hub / github.com/cwida/ALP / ReadBytes

Method ReadBytes

publication/source_code/include/chimp/bit_reader.hpp:111–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109
110 template <class T, uint8_t BYTES>
111 inline T ReadBytes(const uint8_t& remainder) {
112 T result = 0;
113 if (BYTES > 0) { result = result << 8 | InnerReadByte(0); }
114 if (BYTES > 1) { result = result << 8 | InnerReadByte(1); }
115 if (BYTES > 2) { result = result << 8 | InnerReadByte(2); }
116 if (BYTES > 3) { result = result << 8 | InnerReadByte(3); }
117 if (BYTES > 4) { result = result << 8 | InnerReadByte(4); }
118 if (BYTES > 5) { result = result << 8 | InnerReadByte(5); }
119 if (BYTES > 6) { result = result << 8 | InnerReadByte(6); }
120 if (BYTES > 7) { result = result << 8 | InnerReadByte(7); }
121 result = result << remainder | InnerRead(remainder, BYTES);
122 index += (BYTES << 3) + remainder;
123 return result;
124 }
125
126 template <class T>
127 inline T ReadBytes(const uint8_t& bytes, const uint8_t& remainder) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected