Afrowave.AJIS.Streaming 1.1.0

dotnet add package Afrowave.AJIS.Streaming --version 1.1.0
                    
NuGet\Install-Package Afrowave.AJIS.Streaming -Version 1.1.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="Afrowave.AJIS.Streaming" Version="1.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Afrowave.AJIS.Streaming" Version="1.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Afrowave.AJIS.Streaming" />
                    
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 Afrowave.AJIS.Streaming --version 1.1.0
                    
#r "nuget: Afrowave.AJIS.Streaming, 1.1.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 Afrowave.AJIS.Streaming@1.1.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=Afrowave.AJIS.Streaming&version=1.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Afrowave.AJIS.Streaming&version=1.1.0
                    
Install as a Cake Tool

Afrowave.AJIS.Streaming

NuGet

Low-memory streaming parser for the AJIS (.NET) framework. Produces AJIS segments with memory-bounded parsing and single-pass streaming for processing large datasets efficiently.

Overview

The Streaming library provides the low-level streaming infrastructure for the AJIS ecosystem:

  • UTF-8 streaming parser - Single-pass parsing with zero-copy token delivery
  • Segment production - AjisSegment model for streaming token stream
  • Memory-bounded parsing - Bounded memory usage regardless of input size
  • Zero-allocation - Optimized for high-throughput, low-latency scenarios
  • Async support - Non-blocking async streaming with IAsyncEnumerable

Features

  • Streaming reader primitives - IAjisReader, AjisSpanReader, AjisStreamReader
  • UTF-8 text scanning - Strings, numbers, comments (lexer)
  • Segment parser - ParseSegments implementation mapping streams to AjisSegment
  • AjisSegment model - Token stream representation with value and kind
  • Single-pass algorithms - No random access, streaming forward only
  • Bounded memory - No full document materialization
  • Memory-mapped support - Files larger than available memory

Installation

dotnet add package Afrowave.AJIS.Streaming

API

See the API Reference for complete documentation.

Key Types

Type Description
AjisReader Low-level streaming reader
AjisLexer Lexical analysis engine
AjisToken Token representation
AjisSliceUtf8 UTF-8 slice for zero-allocation token delivery
AjisSegment Streaming segment
AjisSegmentMap Map transformation pipeline
AjisSegmentFilter Filter transformation pipeline
AjisSegmentSelect Select transformation pipeline

Dependencies

  • Afrowave.AJIS.Core - Core contracts and settings

Usage

Basic streaming parsing

using System.Text;
using Afrowave.AJIS.Core;
using Afrowave.AJIS.Streaming;

string ajisText = """
{
    name: "John Doe"
    age: 35
    email: "john@example.com"
}
""";

var bytes = Encoding.UTF8.GetBytes(ajisText);
using var ms = new MemoryStream(bytes);
using var reader = new StreamReader(ms);

var parser = new AjisLexerParserStreamingAsync(reader);
await foreach (var segment in parser.ParseAsync())
{
    Console.WriteLine($"{segment.Kind}: {segment.Value}");
}

Segment transformations

// Map transformation
var mapped = segments.Map(segment => new AjisSegment(segment.Kind, Transform(segment.Value)));

// Filter transformation
var filtered = segments.Where(segment => segment.Kind == AjisSegmentKind.Property);

// Select transformation
var selected = segments.Select(segment => segment.Value);

Large file processing

// Memory-efficient processing of large files
await foreach (var segment in ParseSegmentsAsync(largeFileStream))
{
    ProcessSegment(segment);
}

Documentation

Compatibility

  • .NET 10.0+
  • Nullable reference types enabled
  • Requires AllowUnsafeBlocks for optimized memory operations

License

MIT

Product Compatible and additional computed target framework versions.
.NET 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 (2)

Showing the top 2 NuGet packages that depend on Afrowave.AJIS.Streaming:

Package Downloads
Afrowave.AJIS.Serialization

Serialization library for Ajis framework

Afrowave.AJIS.IO

IO library for Ajis framework

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.0 200 2/17/2026
1.0.0 170 2/15/2026

## v1.1.0 (2026-02-16)

### Dependencies

- Updated to depend on Afrowave.AJIS.Core v1.1.0

### Notes

- No breaking changes in this release