CsvDecoder class

Streaming CSV decoder using a chunked state machine.

Handles chunk boundaries that split mid-field, mid-escape, mid-CRLF, or mid-delimiter (multi-character delimiters included). Use for memory-efficient processing of large inputs.

Produces exactly the same rows as FastDecoder.decode for the same input and CsvConfig; the two are held together by a conformance test suite.

bind honors downstream backpressure: when the listener pauses, the upstream subscription is paused, so a slow consumer does not buffer the whole input in memory.

Inheritance

Constructors

CsvDecoder([CsvConfig config = const CsvConfig()])
Create a streaming decoder with the given config.
const

Properties

config CsvConfig
Configuration for this decoder.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

bind(Stream<String> stream) Stream<List>
Transforms the provided stream.
override
bindBytes(Stream<List<int>> stream) Stream<List>
Decode a UTF-8 byte stream directly (file reads, HTTP bodies), without wiring utf8.decoder by hand.
cast<RS, RT>() StreamTransformer<RS, RT>
Provides a StreamTransformer<RS, RT> view of this stream transformer.
inherited
convert(String input) List<List>
Batch: decode complete CSV string to rows.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
startChunkedConversion(Sink<List> sink) Sink<String>
Chunked conversion sink for dart:convert pipeline compatibility.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited