message: if SIZE is known at compile time, so can BYTES and REMAINDER be
diff: @@ -178,20 +178,9 @@ public:
  template <class T, uint8_t SIZE>
  inline T ReadValue() {
  - const uint8_t bytes = SIZE >> 3; //divide by 8;
  - const uint8_t remainder = SIZE & 7;
  - switch (bytes) {
  - case 0: return ReadBytes<uint8_t, 0>(remainder);
  - case 1: return ReadBytes<uint16_t, 1>(remainder);
  - case 2: return ReadBytes<uint32_t, 2>(remainder);
  - case 3: return ReadBytes<uint32_t, 3>(remainder);
  - case 4: return ReadBytes<uint64_t, 4>(remainder);
  - case 5: return ReadBytes<uint64_t, 5>(remainder);
  - case 6: return ReadBytes<uint64_t, 6>(remainder);
  - case 7: return ReadBytes<uint64_t, 7>(remainder);
  - case 8: return ReadBytes<uint64_t, 8>(remainder);
  - default: throw std::runtime_error("ReadValue reports that it needs to read " + std::to_string(bytes) + " bytes");
  - }
  + constexpr uint8_t BYTES = (SIZE >> 3);
  + constexpr uint8_t REMAINDER = (SIZE & 7);
  + return ReadBytes<T, BYTES>(REMAINDER);
  }
  template <class T>
  