BeyondImmersion.Bannou.Bundle.Format 2.0.0

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

Bundle Format

Shared code for reading and writing .bannou bundle files. This is NOT a NuGet package - it's included via <Compile Include> in consuming projects.

Usage

Include in your project file:

<ItemGroup>
  <Compile Include="../bundle-format/*.cs" LinkBase="Bundle" />
</ItemGroup>

Bundle Structure

┌─────────────────────────────────────────────────────────┐
│ Manifest Length (4 bytes, big-endian)                   │
├─────────────────────────────────────────────────────────┤
│ Manifest JSON (UTF-8, variable length)                  │
├─────────────────────────────────────────────────────────┤
│ Index Header: "BNIX" (4 bytes)                          │
├─────────────────────────────────────────────────────────┤
│ Entry Count (4 bytes, big-endian)                       │
├─────────────────────────────────────────────────────────┤
│ Index Entries (48 bytes each)                           │
│   - Offset (8 bytes)                                    │
│   - Compressed Size (8 bytes)                           │
│   - Uncompressed Size (8 bytes)                         │
│   - Content Hash Prefix (24 bytes, SHA256 truncated)    │
├─────────────────────────────────────────────────────────┤
│ Asset Data (LZ4-compressed chunks, concatenated)        │
└─────────────────────────────────────────────────────────┘

Components

File Purpose
BannouBundleWriter.cs Write assets to bundle format
BannouBundleReader.cs Read and decompress assets
BundleManifest.cs Manifest and asset entry types
BundleIndex.cs Binary index for random access
BundleValidator.cs Validation and integrity checks
BundleJson.cs Internal JSON serialization

Writing a Bundle

using BeyondImmersion.Bannou.Bundle.Format;

await using var output = File.Create("my-bundle.bannou");
using var writer = new BannouBundleWriter(output);

// Add assets
writer.AddAsset(
    assetId: "texture-001",
    filename: "diffuse.png",
    contentType: "image/png",
    data: File.ReadAllBytes("diffuse.png"));

// Finalize bundle
writer.Finalize(
    bundleId: "my-bundle-v1",
    name: "My Asset Bundle",
    version: "1.0.0",
    createdBy: "user-123");

Reading a Bundle

using BeyondImmersion.Bannou.Bundle.Format;

await using var input = File.OpenRead("my-bundle.bannou");
using var reader = new BannouBundleReader(input);

// Read header (manifest + index)
reader.ReadHeader();

// Access manifest
Console.WriteLine($"Bundle: {reader.Manifest.Name}");
Console.WriteLine($"Assets: {reader.Manifest.AssetCount}");

// Read specific asset
var data = reader.ReadAsset("texture-001");

// Or iterate all assets
foreach (var (entry, data) in reader.ReadAllAssets())
{
    Console.WriteLine($"  {entry.AssetId}: {entry.ContentType}");
}

Validation

using BeyondImmersion.Bannou.Bundle.Format;

await using var input = File.OpenRead("my-bundle.bannou");
var result = await BundleValidator.ValidateAsync(input);

if (!result.IsValid)
{
    foreach (var error in result.Errors)
    {
        Console.WriteLine($"[{error.Stage}] {error.Message}");
    }
}

Namespace

All types use namespace: BeyondImmersion.Bannou.Bundle.Format

Dependencies

  • K4os.Compression.LZ4 - LZ4 compression
  • System.Text.Json - JSON serialization
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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on BeyondImmersion.Bannou.Bundle.Format:

Package Downloads
BeyondImmersion.Bannou.Client

Client SDK for Bannou service platform with models, events, and WebSocket protocol support. Lightweight package for game clients.

BeyondImmersion.Bannou.Server

Server SDK for Bannou service platform with service clients, models, events, and WebSocket protocol support. Use this for game servers and internal services.

BeyondImmersion.Bannou.AssetLoader

Engine-agnostic asset loading SDK for Bannou. Provides bundle downloading, caching, registry, and type-specific asset loading without service dependencies.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.1-preview.manual... 103 1/17/2026
2.0.1-preview.11 45 1/29/2026
2.0.1-preview.10 53 1/22/2026
2.0.1-preview.9 49 1/19/2026
2.0.1-preview.6 43 1/17/2026
2.0.1-preview.5 38 1/17/2026
2.0.0 489 1/17/2026
1.0.1-preview.4 38 1/17/2026
0.1.0-preview.manual... 61 1/16/2026