[web-csv-toolbox](../README.md) / [Exports](../modules.md) / ParseBinaryOptions # Interface: ParseBinaryOptions\ Parse options for CSV binary. ## Type parameters | Name | Type | | :------ | :------ | | `Header` | extends `ReadonlyArray`\<`string`\> | ## Hierarchy - [`ParseOptions`](ParseOptions.md)\<`Header`\> - [`BinaryOptions`](BinaryOptions.md) ↳ **`ParseBinaryOptions`** ## Table of contents ### Properties - [charset](ParseBinaryOptions.md#charset) - [decomposition](ParseBinaryOptions.md#decomposition) - [demiliter](ParseBinaryOptions.md#demiliter) - [fatal](ParseBinaryOptions.md#fatal) - [header](ParseBinaryOptions.md#header) - [ignoreBOM](ParseBinaryOptions.md#ignorebom) - [quotation](ParseBinaryOptions.md#quotation) ## Properties ### charset • `Optional` **charset**: `string` You can specify the character encoding of the binary. **`Remarks`** TextDecoderStream is used internally. See [Encoding API Compatibility](https://developer.mozilla.org/en-US/docs/Web/API/Encoding_API/Encodings) for the encoding formats that can be specified. **`Default`** ```ts 'utf-8' ``` #### Inherited from [BinaryOptions](BinaryOptions.md).[charset](BinaryOptions.md#charset) #### Defined in [src/common/types.ts:75](https://github.com/kamiazya/web-csv-toolbox/blob/8e8a071/src/common/types.ts#L75) ___ ### decomposition • `Optional` **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](https://developer.mozilla.org/en-US/docs/Web/API/DecompressionStream#browser_compatibility). #### Inherited from [BinaryOptions](BinaryOptions.md).[decomposition](BinaryOptions.md#decomposition) #### Defined in [src/common/types.ts:64](https://github.com/kamiazya/web-csv-toolbox/blob/8e8a071/src/common/types.ts#L64) ___ ### demiliter • `Optional` **demiliter**: `string` CSV field delimiter. **`Remarks`** If you want to parse TSV, specify `'\t'`. This library supports multi-character delimiters. **`Default`** ```ts ',' ``` #### Inherited from [ParseOptions](ParseOptions.md).[demiliter](ParseOptions.md#demiliter) #### Defined in [src/common/types.ts:40](https://github.com/kamiazya/web-csv-toolbox/blob/8e8a071/src/common/types.ts#L40) ___ ### fatal • `Optional` **fatal**: `boolean` If the binary has a invalid character, you can specify whether to throw an error. **`Remarks`** If you specify true, an error will be thrown. If you specify false or not specify it, the invalid character will be replaced with `U+FFFD`. See [TextDecoderOptions.fatal](https://developer.mozilla.org/en-US/docs/Web/API/TextDecoderStream/fatal) for more information about the invalid character. #### Inherited from [BinaryOptions](BinaryOptions.md).[fatal](BinaryOptions.md#fatal) #### Defined in [src/common/types.ts:94](https://github.com/kamiazya/web-csv-toolbox/blob/8e8a071/src/common/types.ts#L94) ___ ### header • `Optional` **header**: `Header` CSV header. **`Remarks`** If you specify this option, the first record will be treated as a normal record. If you don't specify this option, the first record will be treated as a header. **`Default`** ```ts undefined ``` #### Inherited from [ParseOptions](ParseOptions.md).[header](ParseOptions.md#header) #### Defined in [src/common/types.ts:120](https://github.com/kamiazya/web-csv-toolbox/blob/8e8a071/src/common/types.ts#L120) ___ ### ignoreBOM • `Optional` **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](https://developer.mozilla.org/en-US/docs/Web/API/TextDecoderStream/ignoreBOM) for more information about the BOM. **`Default`** ```ts false ``` #### Inherited from [BinaryOptions](BinaryOptions.md).[ignoreBOM](BinaryOptions.md#ignorebom) #### Defined in [src/common/types.ts:85](https://github.com/kamiazya/web-csv-toolbox/blob/8e8a071/src/common/types.ts#L85) ___ ### quotation • `Optional` **quotation**: `string` CSV field quotation. **`Remarks`** This library supports multi-character quotations. **`Default`** ```ts '"' ``` #### Inherited from [ParseOptions](ParseOptions.md).[quotation](ParseOptions.md#quotation) #### Defined in [src/common/types.ts:49](https://github.com/kamiazya/web-csv-toolbox/blob/8e8a071/src/common/types.ts#L49)