2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-05-15 16:31:22 +00:00
metaforce/Runtime/CCRC32.hpp
2018-12-07 19:30:43 -10:00

17 lines
337 B
C++

#pragma once
#include <cstdint>
namespace urde {
class CCRC32 {
static const uint32_t crc32Table[256];
static inline uint32_t permute(uint32_t checksum, uint8_t b) {
return (checksum >> 8) ^ crc32Table[(checksum & 0xFF) ^ b];
}
public:
static uint32_t Calculate(const void* data, uint32_t length);
};
} // namespace urde