Intentional: assumes little-endian. Trades platform-independent hash values for speed by skipping byte-swap on big-endian targets.
| 21 | // Intentional: assumes little-endian. Trades platform-independent hash |
| 22 | // values for speed by skipping byte-swap on big-endian targets. |
| 23 | inline uint64_t read(Span<const std::byte, 8> Data) noexcept { |
| 24 | uint64_t V; |
| 25 | std::memcpy(&V, Data.data(), 8); |
| 26 | return V; |
| 27 | } |
| 28 | inline uint64_t read(Span<const std::byte, 4> Data) noexcept { |
| 29 | uint32_t V; |
| 30 | std::memcpy(&V, Data.data(), 4); |