Table of Contents

Namespace PopcorningGuineaPig.Engine.Assets.Cecal

Classes

CecalManifest

Sidecar manifest written next to a .cecal archive. Records per-asset (size, mtime, hash) so the next pack can skip rehashing unchanged files and determine whether the archive itself needs to be rewritten.

CecalPackException

Thrown by CecalPacker / CecalWriter when packing fails for a specific source file (unreadable, locked, disappeared, etc.). Always carries the offending path.

CecalPacker

Discovers asset files under a project root and packs them into a single .cecal archive with a sidecar manifest for incremental rebuilds.

CecalReader

Opens a .cecal archive for read-only access. Loads the table of contents into a dictionary for O(1) key lookup and exposes entry bytes via bounded sub-streams over the underlying FileStream.

CecalVirtualFileSystem

Memory-mapped runtime reader for .cecal archives. Loads the table of contents into an in-memory dictionary for O(1) lookup and serves asset bytes from an MemoryMappedFile view so reads cost zero heap allocation beyond the destination buffer.

CecalWriter

Streams asset files into a .cecal archive with atomic replacement on successful Complete(). See CECAL_FORMAT.md for the on-disk layout.

CompositeVirtualFileSystem

Tries each layered VFS in order and returns the first hit. Used at runtime to resolve assets from the packed .cecal archive first, then fall through to loose files on disk — so developers can drop a replacement file next to the build output and override the packed copy without rebuilding the archive.

LooseFileVirtualFileSystem

Reads assets directly from disk. Used as the default loader when no .cecal archive is present (development builds running from bin output) and as the fallback tier inside CompositeVirtualFileSystem.

ManifestEntry
PackResult

Outcome of a Pack(string, string) call.

VfsBootstrap

Probes the executable directory for a .cecal archive and constructs the correct runtime VFS stack. Called once by Init(int, int, int, string) so every subclass gets consistent initialization regardless of its Load override.

Structs

CecalEntry

One entry in a .cecal archive's table of contents. See CECAL_FORMAT.md for the on-disk layout this maps to.

Interfaces

IVirtualFileSystem

Runtime asset resolver. Implementations may read from a packed .cecal archive, loose files on disk, or a composite that tries multiple sources in order. Logical paths use forward slashes and are matched case-insensitively — callers may pass either Windows- or POSIX-style separators and the VFS normalizes them.