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
<PackageReference Include="Afrowave.AJIS.Streaming" Version="1.1.0" />
<PackageVersion Include="Afrowave.AJIS.Streaming" Version="1.1.0" />
<PackageReference Include="Afrowave.AJIS.Streaming" />
paket add Afrowave.AJIS.Streaming --version 1.1.0
#r "nuget: Afrowave.AJIS.Streaming, 1.1.0"
#:package Afrowave.AJIS.Streaming@1.1.0
#addin nuget:?package=Afrowave.AJIS.Streaming&version=1.1.0
#tool nuget:?package=Afrowave.AJIS.Streaming&version=1.1.0
Afrowave.AJIS.Streaming
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 -
AjisSegmentmodel 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 -
ParseSegmentsimplementation mapping streams toAjisSegment - 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
- API Reference - Complete API documentation
- Segment Contract - Segment model details
- Streaming Model - Streaming architecture
- Getting Started - Quick start guide
- API Reader Contract - Reader interface
- Streaming API - Streaming docs
Compatibility
- .NET 10.0+
- Nullable reference types enabled
- Requires
AllowUnsafeBlocksfor optimized memory operations
License
MIT
| Product | Versions 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. |
-
net10.0
- Afrowave.AJIS.Core (>= 1.1.0)
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.
## v1.1.0 (2026-02-16)
### Dependencies
- Updated to depend on Afrowave.AJIS.Core v1.1.0
### Notes
- No breaking changes in this release