Skip to main content

Class: B1T6

Class implements the b1t6 encoding encoding which uses a group of 6 trits to encode each byte.

Table of contents

Methods

Constructors

Methods

encodedLen

Static encodedLen(data): number

The encoded length of the data.

Parameters

NameTypeDescription
dataUint8ArrayThe data.

Returns

number

The encoded length.


encode

Static encode(dst, startIndex, src): number

Encode a byte array into trits.

Parameters

NameTypeDescription
dstInt8ArrayThe destination array.
startIndexnumberThe start index to write in the array.
srcUint8ArrayThe source data.

Returns

number

The length of the encode.

Constructors

constructor

new B1T6()