Arcium LogoArcium TS SDK Docs

compressUint128

compressUint128(bytes): bigint[]

Compresses an array of bytes into 128-bit bigints.

Takes an array of bytes whose length is a multiple of 16 and compresses each consecutive 16 bytes into a single 128-bit bigint.

Parameters

ParameterTypeDescription
bytesUint8ArrayThe input byte array. Its length must be a multiple of 16.

Returns

bigint[]

An array of 128-bit bigints, each representing 16 bytes from the input.

Throws

Error if the input length is not a multiple of 16.