mirror of
https://github.com/crskycode/GARbro.git
synced 2026-07-08 01:30:18 +08:00
Crc32 implementation moved to separate file.
this implementation uses 'normal' polynomial representation unlike Crc32 defined in GameRes.
This commit is contained in:
@@ -172,18 +172,8 @@ namespace GameRes.Formats.ShiinaRio
|
||||
{
|
||||
if (length < 0x400 || null == m_scheme.DecodeBin)
|
||||
return;
|
||||
uint crc = 0xffffffff;
|
||||
for (int i = 0; i < 0x100; ++i)
|
||||
{
|
||||
crc ^= (uint)data[index++] << 24;
|
||||
for (int j = 0; j < 8; ++j)
|
||||
{
|
||||
uint bit = crc & 0x80000000u;
|
||||
crc <<= 1;
|
||||
if (0 != bit)
|
||||
crc ^= 0x04c11db7;
|
||||
}
|
||||
}
|
||||
uint crc = Crc32Normal.UpdateCrc (0xFFFFFFFF, data, index, 0x100);
|
||||
index += 0x100;
|
||||
for (int i = 0; i < 0x40; ++i)
|
||||
{
|
||||
uint src = LittleEndian.ToUInt32 (data, index) & 0x1ffcu;
|
||||
|
||||
Reference in New Issue
Block a user