Popcorning Guinea Pig
Search Results for

    Show / Hide Table of Contents

    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.

    Inheritance
    object
    CecalReader
    Implements
    IDisposable
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    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 Source

    CecalReader(string)

    Declaration
    public CecalReader(string path)
    Parameters
    Type Name Description
    string path

    Properties

    | Edit this page View Source

    Entries

    Declaration
    public IReadOnlyDictionary<string, CecalEntry> Entries { get; }
    Property Value
    Type Description
    IReadOnlyDictionary<string, CecalEntry>

    Methods

    | Edit this page View Source

    Dispose()

    Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

    Declaration
    public void Dispose()
    | Edit this page View Source

    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

    Implements

    IDisposable
    • Edit this page
    • View Source
    In this article
    Back to top © 2024 Popcorning Guinea Pig Game Engine. A custom C# game engine for indie developers.