Source code for simvx.core.assets.loaders.bytes_loader

"""Default loader: returns raw bytes from a Source unchanged."""

from __future__ import annotations

from .base import Loader


[docs] class BytesLoader(Loader): """Returns the source's raw bytes. The fallback when no typed loader claims a URI.""" suffixes: tuple[str, ...] = () # claims nothing: used as the fallback
[docs] def parse(self, raw: bytes, uri: str) -> bytes: return raw