UNPKG

slimfits

Version:

Package for loading data stored in FITS data format

27 lines (26 loc) 1.54 kB
import { TypedArray, BitPix } from '../interfaces'; export declare class ArrayUtils { /** * Copies array from source array buffer to target starting from given offset with optional endianess reversal. * @static * @public * @param {ArrayBuffer} source - The source array buffer. * @param {ArrayBuffer} target - The target array buffer. * @param {number} sourceByteOffset - Byte offset in the source ArrayBuffer from which to start copying. * @param {number} length - Length of copied subarray, cannot be 0 * @param {BitPix} type - Type of items being copied, cannot be Unknown * @param {boolean} changeEndian - Flag indicating whether endianess should be reversed. */ static copy(source: ArrayBufferLike, target: ArrayBufferLike, sourceByteOffset: number, length: number, type: BitPix, changeEndian?: boolean, targetByteOffset?: number): void; /** * Generates typed array for given type. * @static * @public * @param {BitPix} bitPix - The type of the array. * @param {number} length - The length of the array. * @return {ITypedArray} - Array of given length and type. */ static generateTypedArray(bitPix: BitPix, length: number): TypedArray; static pluckColumn(source: ArrayBufferLike, target: ArrayBufferLike, rows: number, rowByteWidth: number, rowByteOffset: number, width: number, type: BitPix, changeEndian: boolean): void; static chunk(buffer: ArrayBufferLike, dataType: BitPix, chunkSize: number): TypedArray[]; }