UNPKG

jtc-utils

Version:
35 lines 1.1 kB
export interface Charset { get name(): string; createDecoder(options?: CharsetDecoderOptions): CharsetDecoder; createEncoder(options?: CharsetEncoderOptions): CharsetEncoder; isUnicode(): boolean; isEbcdic(): boolean; } export interface CharsetDecoder { decode(input: Uint8Array, options?: CharsetDecodeOptions): string; } export declare type CharsetDecoderOptions = { fatal?: boolean; ignoreBOM?: boolean; }; export declare type CharsetDecodeOptions = { stream?: boolean; shift?: boolean; }; export interface CharsetEncoder { canEncode(str: string): boolean; encode(str: string, options?: CharsetEncodeOptions): Uint8Array; } export declare type CharsetEncoderOptions = { fatal?: boolean; }; export declare type CharsetEncodeOptions = { shift?: boolean; limit?: number; }; export declare class StandardDecoder implements CharsetDecoder { private decoder; constructor(encoding: string, options?: CharsetDecoderOptions); decode(input: Uint8Array, options?: CharsetDecodeOptions): string; } //# sourceMappingURL=charset.d.mts.map