UNPKG

libpgs

Version:

Renderer for graphical subtitles (PGS) in the browser.

15 lines (14 loc) 698 B
import { BinaryReader } from "./binaryReader"; /** * Handles run length encoded images. */ export declare abstract class RunLengthEncoding { /** * Decodes the run length encoded image. * @param reader The run length encoded binary data reader or buffer. * @param source The source maps the index value to the raw output pixel data. * @param target The pixel data is written to the output. * @return Returns the number of decoded pixels. */ static decode(reader: BinaryReader | Uint8Array, source: number[] | Uint8Array | Uint8ClampedArray | Uint16Array | Uint32Array, target: number[] | Uint8Array | Uint8ClampedArray | Uint16Array | Uint32Array): number; }