Skip to content

About

PocketCsvReader is a library designed for parsing delimited flat files, such as CSV and TSV. Prioritizing simplicity and performance, it facilitates seamless reading and loading of file contents into a DataTable, Array of strings or through an IDataReader. Perfect for projects needing quick data ingestion with minimal configuration.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

1 watching

Forks

Latest commit

 

History

417 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

PocketCsvReader

PocketCsvReader reads CSV and other structured text through forward-only data readers and streaming row outputs. Optional packages support JSON/JSONC, NDJSON, fixed-width, Markdown tables, LTSV, logfmt, web logs, and security logs. The projects target .NET 8, 9, and 10.

Documentation · Installation · Contributing

Packages

Package Purpose
PocketCsvReader CSV/TSV and shared APIs
PocketCsvReader.Json JSON and JSONC with projection and stable field layout for object records
PocketCsvReader.Ndjson NDJSON with projection and stable field layout for object records
PocketCsvReader.Indexing Indexed lookups with sparse, Bloom, zone map, hash, bitmap, and inverted indexes, plus an opt-in scan fallback
PocketCsvReader.ObjectStorage Async Hive-style partition discovery and reads for CSV and other supported flat-file formats on Amazon S3 and Azure Data Lake Storage Gen2
PocketCsvReader.FixedWidth Fixed-width text with fields at fixed character positions
PocketCsvReader.Markdown GitHub Flavored Markdown pipe tables
PocketCsvReader.KeyValue LTSV and logfmt with column projection, aliases, and stable field layout
PocketCsvReader.WebLogs Common, Combined, and W3C web logs
PocketCsvReader.SecurityLogs CEF and LEEF security logs
PocketCsvReader.Arrow Apache Arrow output
PocketCsvReader.Arrow.ColumnarJson Columnar JSON (ClickHouse exports and Arrow fixtures)
PocketCsvReader.Arrow.NetCdf Textual NetCDF CDL
PocketCsvReader.Avro Avro Object Container Files (Windows x64)
PocketCsvReader.Chrononuensis Temporal period parsers
PocketCsvReader.NetTopologySuite WKT and GeoJSON geometry parsers

First example

dotnet add package PocketCsvReader
using System.Text;
using PocketCsvReader.Configuration;

var csv = new CsvReaderBuilder()
    .WithDialect(d => d.WithHeader().WithLineTerminator("\n"))
    .Build();
using var stream = new MemoryStream(Encoding.UTF8.GetBytes("Id,Name\n1,Ada\n"));
using var reader = csv.ToDataReader(stream);
while (reader.Read())
    Console.WriteLine($"{reader.GetInt32(0)}: {reader.GetString(1)}");
// 1: Ada

See output models, reader filtering, object mapping, async reading, inference, and performance guidance for complete behavior and limitations.

Shared ownership, null, conversion, and performance contracts have their authoritative home in the documentation rather than duplicated README sections.

About

PocketCsvReader is a library designed for parsing delimited flat files, such as CSV and TSV. Prioritizing simplicity and performance, it facilitates seamless reading and loading of file contents into a DataTable, Array of strings or through an IDataReader. Perfect for projects needing quick data ingestion with minimal configuration.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages