Files
TheChaseBuzzer/node_modules/music-metadata/lib/common/RandomUint8ArrayReader.d.ts
T
2022-12-22 20:22:22 +11:00

19 lines
814 B
TypeScript

import { IRandomReader } from '../type';
/**
* Provides abstract Uint8Array access via the IRandomRead interface
*/
export declare class RandomUint8ArrayReader implements IRandomReader {
private readonly uint8Array;
readonly fileSize: number;
constructor(uint8Array: Uint8Array);
/**
* Read from a given position of an abstracted file or buffer.
* @param uint8Array - Uint8Array that the data will be written to.
* @param offset - Offset in the buffer to start writing at.
* @param length - Integer specifying the number of bytes to read.
* @param position - Specifies where to begin reading from in the file.
* @return Promise providing bytes read
*/
randomRead(uint8Array: Uint8Array, offset: number, length: number, position: number): Promise<number>;
}