Methods

public static

base64DecToArr(sBase64, nBlocksSize) → Uint8Array

Decodes a Base64 string. Returns a Uint8Array. nBlocksSize is optional.

Parameters

Name Type Optional Description

sBase64

String

 

nBlocksSize

int

 

Returns

Uint8Array 

public static

bigEndianToInt16(data, offset)

Interpret byte buffer as signed big endian 16 bit integer. Returns converted number.

Parameters

Name Type Optional Description

data

ArrayBuffer

 

Input buffer.

offset

number

 

Start of data.

Returns

Converted number.

public static

bigEndianToUint16(data, offset)

Interpret byte buffer as unsigned big endian 16 bit integer. Returns converted number.

Parameters

Name Type Optional Description

data

ArrayBuffer

 

Input buffer.

offset

number

 

Start of data.

Returns

Converted number.

public static

bigEndianToUint32(data, offset)

Interpret byte buffer as unsigned big endian 32 bit integer. Returns converted number.

Parameters

Name Type Optional Description

data

ArrayBuffer

 

Input buffer.

offset

number

 

Start of data.

Returns

Converted number.

public static

littleEndianToInt8(data, offset)

Interpret byte buffer as little endian 8 bit integer. Returns converted number.

Parameters

Name Type Optional Description

data

ArrayBuffer

 

Input buffer.

offset

number

 

Start of data.

Returns

Converted number.

public static

littleEndianToInt16(data, offset)

Interpret byte buffer as little endian 16 bit integer. Returns converted number.

Parameters

Name Type Optional Description

data

ArrayBuffer

 

Input buffer.

offset

number

 

Start of data.

Returns

Converted number.

public static

littleEndianToUint8(data, offset)

Interpret byte buffer as unsigned little endian 8 bit integer. Returns converted number.

Parameters

Name Type Optional Description

data

ArrayBuffer

 

Input buffer.

offset

number

 

Start of data.

Returns

Converted number.

public static

littleEndianToUint16(data, offset)

Interpret byte buffer as unsigned little endian 16 bit integer. Returns converted number.

Parameters

Name Type Optional Description

data

ArrayBuffer

 

Input buffer.

offset

number

 

Start of data.

Returns

Converted number.

public static

littleEndianToUint32(data, offset)

Interpret byte buffer as unsigned little endian 32 bit integer. Returns converted number.

Parameters

Name Type Optional Description

data

ArrayBuffer

 

Input buffer.

offset

number

 

Start of data.

Returns

Converted number.

public static

toHexString(i, byteCount)

Returns the integer i in hexadecimal string form, with leading zeroes, such that the resulting string is at least byteCount*2 characters long.

Parameters

Name Type Optional Description

i

int

 

byteCount

int

 

public static

typedArrayToHexString(data)

Takes a ArrayBuffer or TypedArray and returns its hexadecimal representation. No spaces or linebreaks.

Parameter

Name Type Optional Description

data