public class OggCrc
extends java.lang.Object
Ogg uses the same generator polynomial as ethernet, although with an unreflected alg and an init/final of 0, not 0xffffffff.
Modifier and Type | Field and Description |
---|---|
private static int[] |
crc_lookup
CRC checksum lookup table
|
Constructor and Description |
---|
OggCrc() |
Modifier and Type | Method and Description |
---|---|
static int |
checksum(int crc,
byte[] data,
int offset,
int length)
Calculates the checksum on the given data, from the give offset and
for the given length, using the given initial value.
|
public static int checksum(int crc, byte[] data, int offset, int length)
crc
- - the initial valuedata
- - the dataoffset
- - the offset at which to start calculating the checksum.length
- - the length of data over which to calculate the checksum.Copyright © 1999-2004 Wimba S.A. All Rights Reserved.