crc
object crc
Provides support for calculating cyclic redundancy checks.
class Object
trait Matchable
class Any
Value members
Methods
def apply(poly: BitVector, initial: BitVector, reflectInput: Boolean, reflectOutput: Boolean, finalXor: BitVector): BitVector => BitVector
Constructs a table-based CRC function using the specified polynomial.
Each of the input vectors must be the same size.
- Returns
-
function that calculates a
n
-bit CRC wheren = poly.size
def int32(poly: Int, initial: Int, reflectInput: Boolean, reflectOutput: Boolean, finalXor: Int): BitVector => Int
Constructs a 32-bit, table-based CRC function using the specified polynomial.
- Returns
-
function that calculates a 32-bit CRC
def bitwise(poly: BitVector, initial: BitVector, reflectInput: Boolean, reflectOutput: Boolean, finalXor: BitVector, value: BitVector): BitVector
Calculates a bitwise CRC of the specified value.
If calculating a lot of CRCs, prefer the
and uses it in each CRC calculation.
apply
method, which precomputes a lookup tableand uses it in each CRC calculation.
- Returns
-
function that calculates a
n
-bit CRC wheren = poly.size