PocketCsvReader.WebLogs 2.67.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package PocketCsvReader.WebLogs --version 2.67.0
                    
NuGet\Install-Package PocketCsvReader.WebLogs -Version 2.67.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="PocketCsvReader.WebLogs" Version="2.67.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="PocketCsvReader.WebLogs" Version="2.67.0" />
                    
Directory.Packages.props
<PackageReference Include="PocketCsvReader.WebLogs" />
                    
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 PocketCsvReader.WebLogs --version 2.67.0
                    
#r "nuget: PocketCsvReader.WebLogs, 2.67.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.
#:package PocketCsvReader.WebLogs@2.67.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=PocketCsvReader.WebLogs&version=2.67.0
                    
Install as a Cake Addin
#tool nuget:?package=PocketCsvReader.WebLogs&version=2.67.0
                    
Install as a Cake Tool

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 with projection and stable field layout for object records
PocketCsvReader.Ndjson NDJSON with projection and stable field layout for object records
PocketCsvReader.FixedWidth Fixed character positions
PocketCsvReader.KeyValue LTSV and logfmt with column projection, aliases, and stable field layout
PocketCsvReader.WebLogs Common, Combined, W3C
PocketCsvReader.SecurityLogs CEF and LEEF
PocketCsvReader.Arrow Apache Arrow output
PocketCsvReader.Arrow.ColumnarJson Apache Arrow Integration JSON, ClickHouse JSONColumns and JSONColumnsWithMetadata
PocketCsvReader.Chrononuensis Temporal period parsers

Columnar JSON

Install PocketCsvReader.Arrow.ColumnarJson and import PocketCsvReader.Arrow and PocketCsvReader.Arrow.ColumnarJson. Use new ArrowIntegrationJsonReader() for Arrow fixtures, new ClickHouseJsonColumnsReader(schema) for JSONColumns, or ClickHouseJsonColumnsReader.WithMetadata() for JSONColumnsWithMetadata.

var reader = ClickHouseJsonColumnsReader.WithMetadata();
await foreach (var batch in reader.ToArrowBatchesAsync("export.json"))
{
    using (batch)
        Console.WriteLine(batch.Length);
}

Use ToArrowStreamAsync to inspect the Arrow schema before reading batches. Dispose the returned stream and each batch. Supplied .NET streams stay open by default. ClickHouse decodes each value into Arrow buffers as it reads and produces one batch per document. JSONColumnsWithMetadata requires meta before data. Integration JSON buffers one fixture batch at a time and requires schema before batches.

Integration JSON supports primitive numeric types, booleans, UTF-8, binary and fixed-size binary, dates, times, timestamps, durations, Decimal128, Decimal256, and null. ClickHouse metadata maps booleans, 8- through 64-bit integers, floats, strings, fixed strings, dates, decimals, and single-level arrays of supported types. Nullable controls field nullability. LowCardinality uses its underlying value type. Unsupported types are reported with the field name.

Use ToLazyArrowStream or ToLazyArrowStreamAsync to decode only the columns you access. Both readers expose the schema before reading records.

using var stream = await reader.ToLazyArrowStreamAsync("export.json");
while (await stream.ReadNextRecordAsync() is { } record)
{
    using (record)
        Console.WriteLine(record.Column("id").Length);
}

For a file path, lazy records share the original read-only handle and retain a packed index of value byte boundaries. The index covers every column and lets the first Column call read and decode the requested values directly. Keep the source bytes stable while any record is alive. For a supplied stream, each record stages its raw columns in a temporary file. Records can outlive the input reader in either case. The first Column call can perform synchronous I/O and report conversion errors. Later calls return the cached array. Dispose each record to release its arrays and backing storage.

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.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  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.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on PocketCsvReader.WebLogs:

Package Downloads
Packata.ResourceReaders.WebLogs

Common and W3C web-log resource reader providers for Packata.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.69.0 0 11/10/2026
2.68.0 0 11/10/2026
2.67.0 0 11/9/2026
2.66.0 13 11/9/2026
2.65.0 34 11/9/2026
2.64.0 42 11/9/2026
2.63.0 52 11/6/2026
2.62.0 150 11/2/2026
2.61.1 95 11/2/2026
2.61.0 96 11/2/2026
2.60.1 105 11/1/2026
2.60.0 93 11/1/2026
2.59.1 97 11/1/2026
2.59.0 95 10/31/2026
2.58.1 102 10/31/2026
2.58.0 99 10/31/2026
2.57.1 89 10/31/2026
2.57.0 99 10/31/2026
2.56.0 101 10/31/2026
2.55.0 104 10/30/2026
Loading failed