Fcrc32
Bun

function

zlib.crc32

function crc32(
data: string | Buffer<ArrayBufferLike> | ArrayBufferView<ArrayBufferLike>,
value?: number
): number;

Computes a 32-bit Cyclic Redundancy Check checksum of data. If value is specified, it is used as the starting value of the checksum, otherwise, 0 is used as the starting value.

@param data

When data is a string, it will be encoded as UTF-8 before being used for computation.

@param value

An optional starting value. It must be a 32-bit unsigned integer.

@returns

A 32-bit unsigned integer containing the checksum.