Interface BinaryOptions

CSV Parsing Options for binary.

interface BinaryOptions {
    charset?: string;
    decomposition?: CompressionFormat;
    fatal?: boolean;
    ignoreBOM?: boolean;
}

Hierarchy (view full)

Properties

charset?: string

You can specify the character encoding of the binary.

Remarks

TextDecoderStream is used internally.

See Encoding API Compatibility for the encoding formats that can be specified.

Default

'utf-8'
decomposition?: CompressionFormat

If the binary is compressed by a compression algorithm, the decompressed CSV can be parsed by specifying the algorithm.

Remarks

Make sure the runtime you are running supports stream decompression.

See DecompressionStream Compatibility.

fatal?: boolean

If the binary has a invalid character, you can specify whether to throw an error.

Remarks

If the property is true then a decoder will throw a TypeError if it encounters malformed data while decoding.

If false the decoder will substitute the invalid data with the replacement character U+FFFD (�).

See TextDecoderOptions.fatal for more information.

Default

false
ignoreBOM?: boolean

If the binary has a BOM, you can specify whether to ignore it.

Remarks

If you specify true, the BOM will be ignored. If you specify false or not specify it, the BOM will be treated as a normal character. See TextDecoderOptions.ignoreBOM for more information about the BOM.

Default

false