The type of the header row
Binary CSV processing specification (excludes execution strategy)
A parser instance configured for the specified output format
This is a low-level factory function that accepts BinaryCSVProcessingOptions. It does NOT accept execution strategy options (engine). For high-level APIs with execution strategy support, use parseBinary() and related functions.
This function provides both compile-time and runtime type safety. The return type is determined by the outputFormat option:
outputFormat: 'object' (default) → BinaryObjectCSVParser (FlexibleBinaryObjectCSVParser)outputFormat: 'array' → BinaryArrayCSVParser (FlexibleBinaryArrayCSVParser)const parser = createBinaryCSVParser({
header: ['name', 'age'] as const,
charset: 'utf-8',
decompression: 'gzip',
signal: abortController.signal,
// engine is NOT available (low-level API)
});
const encoder = new TextEncoder();
for (const record of parser.parse(encoder.encode('Alice,30\nBob,25'))) {
console.log(record); // { name: 'Alice', age: '30' }
}
const parser = createBinaryCSVParser({
header: ['name', 'age'] as const,
outputFormat: 'array',
charset: 'utf-8',
// engine is NOT available (low-level API)
});
const encoder = new TextEncoder();
for (const record of parser.parse(encoder.encode('Alice,30\nBob,25'))) {
console.log(record); // ['Alice', '30']
}
Factory function to create the appropriate Binary CSV parser based on options.
The type of the header row
Binary CSV processing specification (excludes execution strategy)
A parser instance configured for the specified output format
This is a low-level factory function that accepts BinaryCSVProcessingOptions. It does NOT accept execution strategy options (engine). For high-level APIs with execution strategy support, use parseBinary() and related functions.
This function provides both compile-time and runtime type safety. The return type is determined by the outputFormat option:
outputFormat: 'object' (default) → BinaryObjectCSVParser (FlexibleBinaryObjectCSVParser)outputFormat: 'array' → BinaryArrayCSVParser (FlexibleBinaryArrayCSVParser)const parser = createBinaryCSVParser({
header: ['name', 'age'] as const,
charset: 'utf-8',
decompression: 'gzip',
signal: abortController.signal,
// engine is NOT available (low-level API)
});
const encoder = new TextEncoder();
for (const record of parser.parse(encoder.encode('Alice,30\nBob,25'))) {
console.log(record); // { name: 'Alice', age: '30' }
}
const parser = createBinaryCSVParser({
header: ['name', 'age'] as const,
outputFormat: 'array',
charset: 'utf-8',
// engine is NOT available (low-level API)
});
const encoder = new TextEncoder();
for (const record of parser.parse(encoder.encode('Alice,30\nBob,25'))) {
console.log(record); // ['Alice', '30']
}
Factory function to create the appropriate Binary CSV parser based on options.
The type of the header row
Binary CSV processing specification (excludes execution strategy)
A parser instance configured for the specified output format
This is a low-level factory function that accepts BinaryCSVProcessingOptions. It does NOT accept execution strategy options (engine). For high-level APIs with execution strategy support, use parseBinary() and related functions.
This function provides both compile-time and runtime type safety. The return type is determined by the outputFormat option:
outputFormat: 'object' (default) → BinaryObjectCSVParser (FlexibleBinaryObjectCSVParser)outputFormat: 'array' → BinaryArrayCSVParser (FlexibleBinaryArrayCSVParser)const parser = createBinaryCSVParser({
header: ['name', 'age'] as const,
charset: 'utf-8',
decompression: 'gzip',
signal: abortController.signal,
// engine is NOT available (low-level API)
});
const encoder = new TextEncoder();
for (const record of parser.parse(encoder.encode('Alice,30\nBob,25'))) {
console.log(record); // { name: 'Alice', age: '30' }
}
const parser = createBinaryCSVParser({
header: ['name', 'age'] as const,
outputFormat: 'array',
charset: 'utf-8',
// engine is NOT available (low-level API)
});
const encoder = new TextEncoder();
for (const record of parser.parse(encoder.encode('Alice,30\nBob,25'))) {
console.log(record); // ['Alice', '30']
}
Factory function to create the appropriate Binary CSV parser based on options.
The type of the header row
Optionaloptions: BinaryCSVProcessingOptions<Header, ",", "\"">Binary CSV processing specification (excludes execution strategy)
A parser instance configured for the specified output format
This is a low-level factory function that accepts BinaryCSVProcessingOptions. It does NOT accept execution strategy options (engine). For high-level APIs with execution strategy support, use parseBinary() and related functions.
This function provides both compile-time and runtime type safety. The return type is determined by the outputFormat option:
outputFormat: 'object' (default) → BinaryObjectCSVParser (FlexibleBinaryObjectCSVParser)outputFormat: 'array' → BinaryArrayCSVParser (FlexibleBinaryArrayCSVParser)const parser = createBinaryCSVParser({
header: ['name', 'age'] as const,
charset: 'utf-8',
decompression: 'gzip',
signal: abortController.signal,
// engine is NOT available (low-level API)
});
const encoder = new TextEncoder();
for (const record of parser.parse(encoder.encode('Alice,30\nBob,25'))) {
console.log(record); // { name: 'Alice', age: '30' }
}
const parser = createBinaryCSVParser({
header: ['name', 'age'] as const,
outputFormat: 'array',
charset: 'utf-8',
// engine is NOT available (low-level API)
});
const encoder = new TextEncoder();
for (const record of parser.parse(encoder.encode('Alice,30\nBob,25'))) {
console.log(record); // ['Alice', '30']
}
Factory function to create the appropriate Binary CSV parser based on options.