UNPKG

@kayahr/text-encoding

Version:
25 lines (24 loc) 847 B
import { AbstractEncoder } from "../AbstractEncoder.js"; import { ByteBuffer } from "../ByteBuffer.js"; import { EncoderConstructor } from "../Encoder.js"; /** * Encoder for single byte encodings. */ export declare class SingleByteEncoder extends AbstractEncoder { private readonly index; /** * Constructs new encoder for the given code points. * * @param codePoints - The code points of the encoding. */ private constructor(); /** * Creates and returns a single byte encoder class for the given code points. * * @param codePoints - The code points of the encoding to encode. * @return The created single byte encoder class. */ static forCodePoints(codePoints: Array<number | null>): EncoderConstructor; /** @inheritDoc */ encode(buffer: ByteBuffer): number | number[]; }