using CRC tab directly

This commit is contained in:
Martchus 2015-10-16 21:46:53 +02:00
parent eaf2223585
commit bd922ddf7e
1 changed files with 1 additions and 2 deletions

View File

@ -76,7 +76,6 @@ uint32 OggPage::computeChecksum(istream &stream, uint64 startOffset)
{
stream.seekg(startOffset);
uint32 crc = 0x0;
uint32 *crc32Table = BinaryReader::crc32Table();
byte value, segmentTableSize = 0, segmentTableIndex = 0;
for(uint32 i = 0, segmentLength = 27; i < segmentLength; ++i) {
switch(i) {
@ -98,7 +97,7 @@ uint32 OggPage::computeChecksum(istream &stream, uint64 startOffset)
++segmentTableIndex;
}
}
crc = (crc << 8) ^ crc32Table[((crc >> 24) & 0xFF) ^ value];
crc = (crc << 8) ^ BinaryReader::crc32Table[((crc >> 24) & 0xFF) ^ value];
}
return crc;
}