FlameCsv 0.2.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package FlameCsv --version 0.2.0
                    
NuGet\Install-Package FlameCsv -Version 0.2.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="FlameCsv" Version="0.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="FlameCsv" Version="0.2.0" />
                    
Directory.Packages.props
<PackageReference Include="FlameCsv" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add FlameCsv --version 0.2.0
                    
#r "nuget: FlameCsv, 0.2.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=FlameCsv&version=0.2.0
                    
Install FlameCsv as a Cake Addin
#tool nuget:?package=FlameCsv&version=0.2.0
                    
Install FlameCsv as a Cake Tool

🔥 FlameCSV 🔥

Fully-featured high performance CSV library for .NET with a simple API, deep customization options, and built-in support for UTF8, nativeAOT, and more. Read CSV at multiple gigabytes per second on consumer hardware, and write arbitrarily large amounts of CSV with near-zero allocations. FlameCSV leverages modern .NET patterns and libraries such as spans, SIMD hardware intrinsics, memory/string pooling, pipes and buffer writers, and is built from the ground up to provide an easy-to-use high performance experience.

See the documentation for more information and examples.

Features

  • 💡 Ease of Use
    • Simple API for reading and writing CSV
    • Built-in support for common CLR types
    • Supports both synchronous and asynchronous operations
    • Flexible; read or write almost any data source
    • Automatic newline detection
    • UTF-8/ASCII support to read/write bytes directly without additional transcoding
    • Supports hot reload
  • 🚀 High Performance
    • Optimized for speed and low memory usage
    • Specialized SIMD-accelerated parsing and unescaping
    • Batteries-included internal caching and memory pooling for near-zero allocations
    • Reflection code paths that rival and exceed manually written code in performance
  • 🛠️ Deep Customization
    • Read or write either .NET objects, or raw CSV records and fields
    • Attribute configuration for header names, constructors, field order, and more
    • Support for custom converters and converter factories
    • Read or write multiple CSV documents from/to a single data stream
  • ✍️ Source Generator
    • Fully annotated and compatible with NativeAOT
    • Supports trimming to reduce application size
    • Debuggable source code instead of compiled expressions
    • Compile-time diagnostics instead of runtime errors

Example

using FlameCsv;

const string data =
    """
    id,name,age
    1,Bob,42
    2,Alice,37
    3,"Bond, James",39
    """;

List<User> users = [];

// read objects from the string
foreach (var user in CsvReader.Read<User>(data))
{
    users.Add(user);
}

// write to stream using a different delimiter
await CsvWriter.WriteAsync(
    new StreamWriter(Stream.Null, Encoding.UTF8),
    users,
    new CsvOptions<char> { Delimiter = '\t' },
    cancellationToken);

Changelog

0.2.0

  • Breaking: Removed Async-suffix from CsvReader methods that support synchronous enumeration
  • Breaking: Removed CsvUnhandledException, value enumerators now throw without wrapping the exception
  • Added support for EnumNameAttribute
  • Added enum converter source generator
  • Added UTF-8 BOM skipping
  • Fixed char converter inconsistencies on non-ASCII inputs
  • Removed unnecessary SIMD instructions when parsing chars

0.1.0

Initial release.

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.3.0 0 6 hours ago
0.2.0 134 12 days ago
0.1.0-rc1 111 20 days ago