Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nreco/csv
Fast C# CSV parser
https://github.com/nreco/csv
csharp csv csv-parser csv-parsing csv-reader dotnet dotnet-core
Last synced: 2 days ago
JSON representation
Fast C# CSV parser
- Host: GitHub
- URL: https://github.com/nreco/csv
- Owner: nreco
- License: mit
- Created: 2018-11-27T16:06:48.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2024-08-08T08:05:30.000Z (3 months ago)
- Last Synced: 2024-11-09T09:40:55.688Z (5 days ago)
- Topics: csharp, csv, csv-parser, csv-parsing, csv-reader, dotnet, dotnet-core
- Language: C#
- Homepage: https://www.nrecosite.com
- Size: 21.5 KB
- Stars: 143
- Watchers: 10
- Forks: 32
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# NReco.Csv
Ultra-fast C# CSV parser: implements stream reader and writer.
[![NuGet Release](https://img.shields.io/nuget/v/NReco.Csv.svg)](https://www.nuget.org/packages/NReco.Csv/)* very fast: x2-x4 times faster than JoshClose's CSVHelper
* memory efficient: uses only single circular buffer, no allocations in heap for CSV of any size
* lightweight: bare csv parser with simple API
* tolerant to not-fully correct CSV files, you can control max length of CSV file (useful for processing end-user CSV uploads)
* can be used for stream processing of many-GB CSV files
* supports all .NET versions: Framework 4.5+, .NET Core, NET6+## How to use
Parse CSV stream:
```
using (var streamRdr = new StreamReader(inputStream)) {
var csvReader = new CsvReader(streamRdr, ",");
while (csvReader.Read()) {
for (int i=0; i