Skip to main content

Koan media runtime for Entity-backed originals, recipe discovery, validated image pipelines, rendering, and runtime facts.

Total Downloads
3.5K
3,520
Published
Sep 13, 2026
1mo ago

Get Started

dotnet add package Sylin.Koan.Media.Core --version 1.0.56
ProductVersions
.NET
net10.0

README

Sylin.Koan.Media.Core

The Koan media runtime: Entity-backed originals, content-addressed deduplication, recipe discovery and validation, lazy image pipelines, encoder selection, and inspectable startup facts.

Install

dotnet add package Sylin.Koan.Media.Core

An application also references Data and Storage providers appropriate to its environment. AddKoan() discovers Media Core; no media-specific registration call is required for Entity or direct-pipeline use.

Smallest meaningful use

using Koan.Media;

public sealed class Photo : MediaEntity<Photo>;

var photo = await Photo.Upload(source, "original.jpg", "image/jpeg", ct: ct);
await using var bytes = await Photo.OpenRead(photo.Key, ct);

Photo.Store(bytes, ...) uses a SHA-256 key and returns the existing Entity when identical content is already present. Photo.Upload(...) preserves caller-owned naming.

Direct processing is lazy until a terminal:

using Koan.Media.Abstractions.Recipes;
using Koan.Media.Core.Pipeline;

var output = await source.AsMedia()
    .Resize(width: 320)
    .EncodeAs("jpeg", Quality.Web)
    .WriteToAsync(destination, ct);

Static [MediaRecipe] factories and Koan:Media:Recipes configuration enter one catalog. Invalid steps, duplicate names, reserved shortcut collisions, and unavailable output encoders stop host startup before traffic.

Guarantees and boundaries

  • Media Core is an in-process Entity/media runtime, not a durable rendering job system.
  • MediaEntity.Store(Stream, ...) currently buffers the complete source to compute its hash.
  • A successful Upload writes storage and returns hydrated Entity metadata; callers own any additional domain save.
  • Pipeline output can stream, but decoders may retain complete pixel/frame state; direct callers own ingress limits.
  • Recipes do not imply prewarming, background scheduling, orphan cleanup, HTTP routes, or access policy.
  • Sylin.Koan.Media.Web owns bounded HTTP rendering, negotiation, diagnostics, and access-gated source resolution.

See TECHNICAL.md and the Media reference.

Downloads by Version

Similar & Alternative Packages

Hand-picked matching NuGet libraries based on tags & ecosystem

Depended On By

Find packages that declare this package as a dependency. NuGet does not provide a reverse-dependency endpoint, so candidates are checked on demand.

Adoption Assessment

Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.

Compatibility metadata lists 1 target framework; confirm the exact target used by your application.The published metadata declares 26 direct dependency entries across framework groups. Inspect the resolved dependency graph for your target framework.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.