Nalix.Codec
14.2.14
See the version list below for details.
dotnet add package Nalix.Codec --version 14.2.14
NuGet\Install-Package Nalix.Codec -Version 14.2.14
<PackageReference Include="Nalix.Codec" Version="14.2.14" />
<PackageVersion Include="Nalix.Codec" Version="14.2.14" />
<PackageReference Include="Nalix.Codec" />
paket add Nalix.Codec --version 14.2.14
#r "nuget: Nalix.Codec, 14.2.14"
#:package Nalix.Codec@14.2.14
#addin nuget:?package=Nalix.Codec&version=14.2.14
#tool nuget:?package=Nalix.Codec&version=14.2.14
Nalix.Codec
Serialization, packet framing, compression, and cryptographic transform primitives for Nalix.
Nalix.Codec owns the data representation layer: source-generated serialization, packet/frame models, LZ4 compression, AEAD envelope ciphers, and the transform pipeline used by the runtime and SDK.
Install
dotnet add package Nalix.Codec
What It Provides
| Area | Purpose | Main types |
|---|---|---|
| Packet model | Packet base types and runtime packet metadata | PacketBase<TPacket>, FrameBase, PacketRegistry, PacketSchema |
| Protocol frames | Built-in control, directive, handshake, key exchange, and resume frames | Control, Directive, Handshake, KeyExchange, SessionResume |
| Serialization | Source-generated binary serialization | LiteSerializer, FormatterProvider, IFormatter<T>, IFillableFormatter<T> |
| Transform pipeline | Ordered compression and encryption stages | FrameTransformer, FramePipeline, FrameCompression, FrameCipher |
| Cryptography | X25519 handshakes, envelope ciphers, hashes, and MACs | HandshakeX25519, EnvelopeCipher, Keccak256, HmacKeccak256, Poly1305 |
| Compression | Pool-backed LZ4 block and stream compression | LZ4BlockEncoder, LZ4Codec, LZ4Encoder, LZ4Decoder |
| Pooling | Scoped packet allocation and object lifecycle helpers | PacketScope, PacketFactory |
Minimal Packet
using Nalix.Abstractions.Serialization;
using Nalix.Codec.DataFrames;
[Packet]
[GenerateFormatter]
[SerializePackable(SerializeLayout.Explicit)]
public partial class ChatMessage : PacketBase<ChatMessage>
{
[SerializeOrder(0)]
public string Text { get; set; } = string.Empty;
public ChatMessage()
{
this.OpCode = 201;
}
}
Serialization
byte[] encoded = LiteSerializer.Serialize(new ChatMessage { Text = "hello" });
ChatMessage decoded = LiteSerializer.Deserialize<ChatMessage>(encoded, out int bytesRead);
Design Notes
- Hot paths use spans and pooled buffers.
- Packet serialization is source generated instead of reflection based.
- Cryptographic primitives live in
Nalix.Codec.Security; do not replace them with application code.
Documentation
- Package guide: https://ppn.io.vn/packages/nalix-codec/
- API reference: https://ppn.io.vn/api/codec/
| 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
- Nalix.Abstractions (>= 14.2.14)
- Nalix.Environment (>= 14.2.14)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Nalix.Codec:
| Package | Downloads |
|---|---|
|
Nalix.SDK
Nalix.SDK provides the client-side development kit for the Nalix ecosystem, offering high-level APIs, transport sessions (TCP, UDP, and WebSockets), time synchronization helpers, and typed message subscription models for building distributed applications. It acts as the bridge between application logic and the Nalix.Network layer, simplifying remote communication, configuration, and message orchestration through clean, extensible, and developer-friendly interfaces. |
|
|
Nalix.Runtime
Nalix.Runtime provides the core packet processing and middleware infrastructure for the Nalix ecosystem. It includes the middleware pipeline orchestration, packet dispatching channels, and execution management needed to handle message-oriented traffic with high efficiency and low latency. It serves as the foundation for building complex message-processing workflows, offering a modular and extensible architecture that decouples transport logic from application-level packet handling. |
|
|
Nalix.Hosting
Nalix.Hosting provides Microsoft-style host and builder APIs for the Nalix ecosystem. It wires configuration loading, diagnostic event bridging, packet dispatch, and TCP/UDP listener lifecycle into a familiar builder/build/start workflow for quickly bootstrapping Nalix-based servers. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 14.4.0 | 955 | 11/22/2026 |
| 14.3.10 | 177 | 11/19/2026 |
| 14.3.9 | 12,160 | 10/27/2026 |
| 14.3.8 | 688 | 10/26/2026 |
| 14.3.7 | 4,041 | 10/24/2026 |
| 14.3.6 | 133 | 10/24/2026 |
| 14.3.5 | 241 | 10/6/2026 |
| 14.3.4 | 130 | 10/6/2026 |
| 14.3.3 | 172 | 9/26/2026 |
| 14.3.2 | 141 | 9/26/2026 |
| 14.3.1 | 347 | 8/29/2026 |
| 14.3.0 | 183 | 8/27/2026 |
| 14.2.18 | 207 | 8/13/2026 |
| 14.2.17 | 204 | 8/11/2026 |
| 14.2.16 | 238 | 8/1/2026 |
| 14.2.15 | 182 | 7/31/2026 |
| 14.2.14 | 171 | 7/31/2026 |
| 14.2.13 | 173 | 7/31/2026 |
| 14.2.12 | 193 | 7/29/2026 |
| 14.2.11 | 170 | 7/28/2026 |
- Pipeline-Oriented Architecture: Unified Serialization, Compression, and Security into a cohesive Codec stack.
- High-Performance Framing: Integrated DataFrames (PacketBase, FrameBase) and structured ProtocolFrames for unified control and data transport.
- Advanced Cryptography: Hardened AEAD engines (Chacha20Poly1305/Salsa20Poly1305) and high-speed X25519 key exchange.
- Optimized Serialization: Refined LiteSerializer with source-generated codecs for complex types and fast unmanaged paths.
- Efficient Compression: Integrated LZ4 block encoders with custom memory pool support to minimize GC pressure.