Class 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.
Implements
Inherited Members
Namespace: PopcorningGuineaPig.Engine.Assets.Cecal
Assembly: PopcorningGuineaPig.Engine.dll
Syntax
public sealed class CecalReader : IDisposable
Remarks
Story 7.4 ships this plain-FileStream reader so the packer can be independently tested. Story 7.5 will extend/replace this with a memory-mapped VFS resolver for runtime loading.
Constructors
| Edit this page View SourceCecalReader(string)
Declaration
public CecalReader(string path)
Parameters
| Type | Name | Description |
|---|---|---|
| string | path |
Properties
| Edit this page View SourceEntries
Declaration
public IReadOnlyDictionary<string, CecalEntry> Entries { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyDictionary<string, CecalEntry> |
Methods
| Edit this page View SourceDispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
TryOpen(string, out Stream)
Returns a bounded, seekable, read-only Stream over the entry's
bytes inside the archive, or false if the logical path is unknown.
The returned stream must be disposed by the caller and must not outlive the
CecalReader. Multiple sub-streams from the same reader are safe
to read concurrently — reads are serialized through the reader's internal lock.
Declaration
public bool TryOpen(string logicalPath, out Stream stream)
Parameters
| Type | Name | Description |
|---|---|---|
| string | logicalPath | |
| Stream | stream |
Returns
| Type | Description |
|---|---|
| bool |