Static
bufConverts a DataView, Uint8Array, or number array to a hexadecimal string with byte separator.
Static
bytesConverts a Uint8Array of length 2 to a 16-bit signed integer (big endian).
Static
bytesConverts a Uint8Array of length 2 to a 16-bit signed integer (big endian).
Static
countCount non-zero
bits in the byte array.
For split
mode:
Data splitted to the three chunks (last chunk sizes can be lesser, base chunk size is printhead size / 8 / 3
)
and non-zero
bit count calculated from each chunk.
If data size is more than printheadPixels / 8
, only total
mode can be used.
For total
mode:
Return total number of pixel in little-endian format: [0, LL, HH]
For auto
mode:
By default split
mode used. If it is not available, total
mode used.
Static
dataConverts a DataView object to an array of numbers.
Static
dataConverts a DataView object to a Uint8Array
Static
getChecks environment functionality
Static
hasStatic
hexConverts a hexadecimal string to a Uint8Array buffer.
Static
isStatic
isStatic
numberConverts a given number to its hexadecimal representation.
Static
sleepAsynchronously pauses the execution for the specified amount of time.
Static
u16Converts a 16-bit unsigned integer to an array of two bytes (big endian).
Static
u32Converts a 32-bit unsigned integer to an array of two bytes (big endian).
Static
u8Static
u8Compares two Uint8Arrays to check if they are equal.
Static
u8Converts a Uint8Array to a string using TextDecoder.
Utility class for various common operations.