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

309 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, 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
PocketCsvReader.Ndjson NDJSON
PocketCsvReader.FixedWidth Fixed character positions
PocketCsvReader.KeyValue LTSV and logfmt
PocketCsvReader.WebLogs Common, Combined, W3C
PocketCsvReader.SecurityLogs CEF and LEEF
PocketCsvReader.Arrow Apache Arrow output
PocketCsvReader.Chrononuensis Temporal period 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