.. Copyright (c) 2026 Tobias Erbsland - Erbsland DEV. https://erbsland.dev SPDX-License-Identifier: Apache-2.0 .. index:: single: Compiled Resources; Reference single: Compiled Resources single: Resources ****************** Compiled Resources ****************** :cpp:class:`Resources ` provides exact, case-sensitive lookup by identifier and normalized relative path. Optional accessors distinguish a present empty file from a missing key, while ``OrThrow`` variants report :cpp:class:`ResourceError `. Stored and Logical Values ========================= ``getStoredData()`` borrows the immutable bytes embedded in the executable. ``getData()`` and ``getText()`` return the original logical content and transparently decode compressed resources. Uncompressed text uses literal-backed storage, while decoded values are cached on first access. Generated storage keeps opaque data blocks separate from versioned metadata blocks. The resource manager parses and caches metadata only when the resource index is first accessed. Metadata ======== :cpp:class:`ResourceInfo ` reports logical and stored sizes, optional compression and SHA3-256 metadata, and the reserved encryption state. The encryption state is always false for compiled resources generated by this version. Application Access ================== :cpp:func:`Application::resources() ` creates the manager lazily and returns a read-only process-wide resource interface. Applications without generated resources receive an empty manager. Interface ========= .. doxygenclass:: erbsland::resource::ResourceError :members: .. doxygenenum:: erbsland::resource::ResourceErrorCategory .. doxygenclass:: erbsland::resource::ResourceInfo :members: .. doxygenclass:: erbsland::resource::ResourceManager :members: .. doxygenclass:: erbsland::resource::Resources :members: