Function
Static Public Summary | ||
public |
arrayToBuffer(srcArray: Array, existedBuffer: ArrayBuffer, byteOffset: Number, length: Number, littleEndian: Boolean): ArrayBuffer Copies a source typed array to a destination buffer |
|
public |
bufferToArray(srcBuffer: ArrayBuffer, dstArray: Array, byteOffset: Number, length: Number, littleEndian: Boolean): Array Copies a source buffer to a destination typed array |
|
public |
bufferToStruct(srcBuffer: ArrayBuffer, dstStruct: Object | Object[], byteOffset: Number, littleEndian: Boolean): Object Copies a source buffer to a destination structure |
|
public |
float32(size: Number): Float32Array Returns new 'float array[size]' C equivalent |
|
public |
float64(size: Number): Float64Array Returns new 'double array[size]' C equivalent |
|
public |
int16(size: Number): Int16Array Returns new 'short array[size]' C equivalent |
|
public |
int32(size: Number): Int32Array Returns new 'int array[size]' C equivalent |
|
public |
Returns new 'char array[size]' C equivalent |
|
public |
Returns new 'struct s[size]' C equivalent with 'byteLength' field is a total size of structure |
|
public |
structToBuffer(srcStruct: Object | Object[], existedBuffer: ArrayBuffer, byteOffset: Number, littleEndian: Number): ArrayBuffer Copies a source structure to a destination buffer |
|
public |
uint16(size: Number): Uint16Array Returns new 'unsigned short array[size]' C equivalent |
|
public |
uint32(size: Number): Uint32Array Returns new 'unsigned int array[size]' C equivalent |
|
public |
uint8(size: Number): Uint8Array Returns new 'unsigned char array[size]' C equivalent |
Static Public
public arrayToBuffer(srcArray: Array, existedBuffer: ArrayBuffer, byteOffset: Number, length: Number, littleEndian: Boolean): ArrayBuffer source
import {arrayToBuffer} from 'ctype-js/src/ctype.js'
Copies a source typed array to a destination buffer
Params:
Name | Type | Attribute | Description |
srcArray | Array | Source typed array |
|
existedBuffer | ArrayBuffer |
|
DesExisted buffer |
byteOffset | Number |
|
Byte offset from a start of a source typed array |
length | Number |
|
Byte length for copying from a source typed array |
littleEndian | Boolean |
|
Little-endian bytes order flag |
public bufferToArray(srcBuffer: ArrayBuffer, dstArray: Array, byteOffset: Number, length: Number, littleEndian: Boolean): Array source
import {bufferToArray} from 'ctype-js/src/ctype.js'
Copies a source buffer to a destination typed array
Params:
Name | Type | Attribute | Description |
srcBuffer | ArrayBuffer | Source buffer |
|
dstArray | Array | Destination typed array |
|
byteOffset | Number |
|
Byte offset from a start of a source buffer |
length | Number |
|
Byte length for copying from a source buffer |
littleEndian | Boolean |
|
Little-endian bytes order flag |
public bufferToStruct(srcBuffer: ArrayBuffer, dstStruct: Object | Object[], byteOffset: Number, littleEndian: Boolean): Object source
import {bufferToStruct} from 'ctype-js/src/ctype.js'
Copies a source buffer to a destination structure
Params:
Name | Type | Attribute | Description |
srcBuffer | ArrayBuffer | Source buffer |
|
dstStruct | Object | Object[] | Destination structure or array of structures |
|
byteOffset | Number |
|
Byte offset from a start of a source buffer |
littleEndian | Boolean |
|
Little-endian bytes order flag |
public float32(size: Number): Float32Array source
import {float32} from 'ctype-js/src/ctype.js'
Returns new 'float array[size]' C equivalent
Params:
Name | Type | Attribute | Description |
size | Number |
|
Array length |
public float64(size: Number): Float64Array source
import {float64} from 'ctype-js/src/ctype.js'
Returns new 'double array[size]' C equivalent
Params:
Name | Type | Attribute | Description |
size | Number |
|
Array length |
public int16(size: Number): Int16Array source
import {int16} from 'ctype-js/src/ctype.js'
Returns new 'short array[size]' C equivalent
Params:
Name | Type | Attribute | Description |
size | Number |
|
Array length |
public int32(size: Number): Int32Array source
import {int32} from 'ctype-js/src/ctype.js'
Returns new 'int array[size]' C equivalent
Params:
Name | Type | Attribute | Description |
size | Number |
|
Array length |
public int8(size: Number): Int8Array source
import {int8} from 'ctype-js/src/ctype.js'
Returns new 'char array[size]' C equivalent
Params:
Name | Type | Attribute | Description |
size | Number |
|
Array length |
public struct(srcStruct: Object, size: Number): Object source
import {struct} from 'ctype-js/src/ctype.js'
Returns new 'struct s[size]' C equivalent with 'byteLength' field is a total size of structure
public structToBuffer(srcStruct: Object | Object[], existedBuffer: ArrayBuffer, byteOffset: Number, littleEndian: Number): ArrayBuffer source
import {structToBuffer} from 'ctype-js/src/ctype.js'
Copies a source structure to a destination buffer
Params:
Name | Type | Attribute | Description |
srcStruct | Object | Object[] | Source structure or array of structures |
|
existedBuffer | ArrayBuffer |
|
Existed buffer |
byteOffset | Number |
|
Byte offset from a start of a source buffer |
littleEndian | Number |
|
Little-endian bytes order flag |
public uint16(size: Number): Uint16Array source
import {uint16} from 'ctype-js/src/ctype.js'
Returns new 'unsigned short array[size]' C equivalent
Params:
Name | Type | Attribute | Description |
size | Number |
|
Array length |
public uint32(size: Number): Uint32Array source
import {uint32} from 'ctype-js/src/ctype.js'
Returns new 'unsigned int array[size]' C equivalent
Params:
Name | Type | Attribute | Description |
size | Number |
|
Array length |
public uint8(size: Number): Uint8Array source
import {uint8} from 'ctype-js/src/ctype.js'
Returns new 'unsigned char array[size]' C equivalent
Params:
Name | Type | Attribute | Description |
size | Number |
|
Array length |