Cave.IO 4.0.6

There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Cave.IO --version 4.0.6
                    
NuGet\Install-Package Cave.IO -Version 4.0.6
                    
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="Cave.IO" Version="4.0.6" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Cave.IO" Version="4.0.6" />
                    
Directory.Packages.props
<PackageReference Include="Cave.IO" />
                    
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 Cave.IO --version 4.0.6
                    
#r "nuget: Cave.IO, 4.0.6"
                    
#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 Cave.IO@4.0.6
                    
#: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=Cave.IO&version=4.0.6
                    
Install as a Cake Addin
#tool nuget:?package=Cave.IO&version=4.0.6
                    
Install as a Cake Tool

Cave.IO

High-performance .NET I/O utilities for binary data processing, endian conversion, buffering primitives, bit-level stream access, INI files, and lightweight serialization.

Repository: https://github.com/CaveSystems/cave-io
License: MIT


Overview

Cave.IO is a multi-targeted .NET library focused on fast, low-overhead data handling.
It provides tools commonly needed in protocol stacks, file formats, embedded systems, and performance-sensitive backend systems.

The package includes:

  • Fast low-overhead data readers and writers
  • Endian conversion utilities
  • Bit-level stream readers and writers
  • Ring buffer utilities
  • High-performance struct marshalling
  • INI readers and writers
  • BinarySerializer for lightweight object serialization
  • BlobSerializer for version-resilient binary serialization
    • reflection-based converters
    • custom converters
    • dictionary and enumerable support

Features

  • Performance-oriented I/O with minimal overhead
  • Broad framework support from legacy .NET Framework to modern .NET
  • Binary-first design for protocol and storage scenarios
  • Flexible serialization for evolving data contracts
  • Simple integration into existing stream-based workflows

Supported Target Frameworks

  • .NET Framework 2.0
  • .NET Framework 3.5
  • .NET Framework 4.0
  • .NET Framework 4.5
  • .NET Framework 4.6
  • .NET Framework 4.7
  • .NET Framework 4.8
  • .NET Standard 2.0
  • .NET Standard 2.1
  • .NET 8

Installation

Package Manager

Install-Package Cave.IO

.NET CLI

dotnet add package Cave.IO

Typical Use Cases

1) Fast Binary Read/Write

Use Cave.IO readers and writers for efficient primitive and structured binary access in custom file and protocol formats.

  • Use DataReader and DataWriter for non-buffering, low-overhead access to binary data.
  • Use BitStreamReader and BitStreamWriter for bit-level manipulation in compact binary formats.

2) Endian-Safe Processing

Use endian conversion helpers when working with network protocols, device data, or cross-platform binary formats.

3) Buffering and Ring Buffers

Use ring buffers for producer-consumer pipelines and other streaming scenarios with controlled memory usage.

  • Use RingBuffer<TValue> for lock-free buffering with fixed capacity.
  • Use CircularBuffer<TValue> for fixed-capacity ring buffering with overflow prevention.

4) INI Configuration

Read and write INI-style configuration files with lightweight parsing and serialization utilities.

5) Object Serialization

  • Use BinarySerializer for straightforward binary object serialization.
  • Use BlobSerializer when schema evolution and converter extensibility are required.
  • Use LittleEndian, BigEndian, BitConverterLE, and BitConverterBE for endian-aware struct marshalling and byte-array conversions.

Serialization Notes

BlobSerializer is designed for robust binary serialization in long-lived systems:

  • Custom converters for domain-specific types
  • Reflection-based conversion support
  • Support for collections such as dictionaries and enumerables
  • Better adaptability to changing object structures

This is useful when backward and forward compatibility matter.


Repository Structure

  • Cave.IO - main library project
  • StringEncodingGenerator - tooling and generator project
  • Test - framework-specific test projects and validation

Versioning and Compatibility

  • Designed to support both legacy and current .NET environments
  • Prefer the latest package version for fixes and performance improvements
  • Validate serialization format compatibility in integration tests when upgrading

Contributing

Contributions are welcome.

  1. Fork the repository
  2. Create a feature or fix branch
  3. Add or update tests
  4. Open a pull request with clear change notes

Please keep changes focused and maintain backward compatibility where possible.


License

This project is licensed under the MIT License.
See LICENSE for details.


Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  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 was computed.  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 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net20 is compatible.  net35 is compatible.  net40 is compatible.  net403 was computed.  net45 is compatible.  net451 was computed.  net452 was computed.  net46 is compatible.  net461 was computed.  net462 was computed.  net463 was computed.  net47 is compatible.  net471 was computed.  net472 was computed.  net48 is compatible.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (16)

Showing the top 5 NuGet packages that depend on Cave.IO:

Package Downloads
Cave.Data

CaveSystems Database Library. Provides simple, fast and typesafe access to ADO.NET based databases. This package supports database first development.

Cave.Net

Provides classes for fast and easy access to fast async tcp streaming, dns client, ssl client and server and ntp client and server implementations.

Cave.Logging

Provides logging primitives and types for asynchronous, background-dispatched logging. Messages are queued and distributed by a background thread to keep logging fast even when receivers are slow (file, database, network).

Cave.Compression

The compression library is a modified version of the MIT version of SharpZipLib.

Cave.Media

CaveSystems Media Library. This packages contains methods for audio, video, image and color handling.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.0.7-ci-master-20260503-0001 76 5/3/2026
4.0.6 120 4/26/2026
4.0.6-ci-master-20260426-0002 95 4/26/2026
4.0.5 89 4/24/2026
4.0.5-ci-master-20260424-0001 97 4/24/2026
4.0.4 175 4/21/2026
4.0.4-ci-master-20260421-0001 85 4/21/2026
4.0.4-ci-master-20260420-0001 97 4/20/2026
4.0.3 5,368 11/24/2024
4.0.3-ci-master-20241124-0001 200 11/24/2024
4.0.2 480 10/20/2024
4.0.2-ci-merge-20241020-0002 218 10/20/2024
4.0.2-ci-master-20241020-0003 205 10/20/2024
4.0.2-ci-extensions-2024102... 218 10/20/2024
4.0.1 721 10/10/2024
4.0.0-ci-20241010-4 175 10/10/2024
4.0.0-ci-20241010-3 172 10/10/2024
4.0.0-ci-20241008-1 187 10/8/2024
4.0.0-ci-20241007-2 203 10/7/2024
4.0.0-ci-20241007-1 187 10/7/2024
Loading failed