dreamworkAPI
Ctrl K
GitHub
classDocs / Adler32

Adler32

classsharedmenusource
Object → Adler32

The Adler-32 checksum calculation object.

Constructor

Adler32(): Adler32

Fields

NameTypeDescription
DigestSizeintegerThe size of the checksum in bytes. = 4
BlockSizeintegerThe block size in bytes. = 8

Static functions

#Adler32.digest

sharedmenunodiscardsource
function Adler32.digest(raw_str: string): integer

Calculates the Adler-32 checksum of the specified string.

Parameters
NameTypeDescription
raw_strstringThe string is used to calculate checksum.
Returns
TypeNameDescription
integerchecksumThe checksum value, which is greater or equal to 0, and less than 2^32 (0x100000000).

Methods

digestFinalizes checksum calculation and returns the resulting checksum.
resetResets checksum to the initial value.
updateUpdates checksum with the specified string.

#Adler32:digest

sharedmenunodiscardsource
function Adler32:digest(): integer

Finalizes checksum calculation and returns the resulting checksum.

Returns
TypeNameDescription
integerchecksumThe final checksum value, which is greater or equal to 0, and less than 2^32 (0x100000000).

#Adler32:reset

sharedmenusource
function Adler32:reset(): Adler32

Resets checksum to the initial value.

Returns
TypeNameDescription
Adler32self

#Adler32:update

sharedmenusource
function Adler32:update(raw_str: string): Adler32

Updates checksum with the specified string.

Parameters
NameTypeDescription
raw_strstringThe string is used to update checksum.
Returns
TypeNameDescription
Adler32self
Generated from the dreamwork meta branch.