Methods
decode
- decode(value, encoding?): string
Returns string
Protected
detectEncodingByBOMFromBuffer
- detectEncodingByBOMFromBuffer(buffer, bytesRead): undefined | "utf16le" | "utf8bom" | "utf16be"
Parameters
- buffer: Buffer
- bytesRead: number
Returns undefined | "utf16le" | "utf8bom" | "utf16be"
exists
- exists(encoding): boolean
Returns boolean
Protected
guessEncodingByBuffer
- guessEncodingByBuffer(buffer): Promise<undefined | string>
Returns Promise<undefined | string>
toIconvEncoding
- toIconvEncoding(encoding?): string
Parameters
Optional
encoding: string
Returns string
toResourceEncoding
- toResourceEncoding(encoding, options): Promise<ResourceEncoding>
Parameters
- encoding: string
- options: {
overwriteEncoding?: boolean;
read: ((length) => Promise<Uint8Array>);
}Optional
overwriteEncoding?: boolean
read: ((length) => Promise<Uint8Array>)
- (length): Promise<Uint8Array>
Returns Promise<Uint8Array>