Module liba.crc32

32-bit Cyclic Redundancy Check

Functions

new (poly, reversed) constructor for 32-bit Cyclic Redundancy Check
gen (ctx, poly, reversed) generate for 32-bit Cyclic Redundancy Check
eval (ctx, block, value) calculate for 32-bit Cyclic Redundancy Check
pack (ctx, block, value) pack a block and its 32-bit Cyclic Redundancy Check value


Functions

new (poly, reversed)
constructor for 32-bit Cyclic Redundancy Check

Parameters:

  • poly integer polynomial that is CRC's divisor
  • reversed boolean whether or not to reverse

Returns:

    a.crc32 32-bit Cyclic Redundancy Check userdata
gen (ctx, poly, reversed)
generate for 32-bit Cyclic Redundancy Check

Parameters:

  • ctx a.crc32 32-bit Cyclic Redundancy Check userdata
  • poly integer polynomial that is CRC's divisor
  • reversed boolean whether or not to reverse

Returns:

    a.crc32 32-bit Cyclic Redundancy Check userdata
eval (ctx, block, value)
calculate for 32-bit Cyclic Redundancy Check

Parameters:

  • ctx a.crc32 32-bit Cyclic Redundancy Check userdata
  • block string block to be processed
  • value integer initial value

Returns:

    integer output value
pack (ctx, block, value)
pack a block and its 32-bit Cyclic Redundancy Check value

Parameters:

  • ctx a.crc32 32-bit Cyclic Redundancy Check userdata
  • block string block to be processed
  • value integer initial value

Returns:

    string packed block
generated by LDoc 1.5.0 Last updated 2024-09-30 14:51:04