SDK JS
    Preparing search index...

    Class BvcAutoDecoder

    BvcAutoDecoder — the auto backend: picks per decodeTiles call, once the open metadata is known, between the in-process BvcDecoder (small single-tile files — no worker spawn) and a lazily created BvcWorkerDecoder pool (multi-tile or large files). Explicit cpu-wasm / cpu-wasm-workers requests still force their paths via the factories.

    Implements

    • Decoder
    Index

    Constructors

    Properties

    backend: "auto" = ...

    The backend this decoder is actually running.

    Methods

    • Stream-decode every tile. Each yielded tile's typed arrays are transferred from the worker (zero-copy), so do not reuse a tile's arrays after the next iteration.

      Parameters

      • model: DecodedModel

        The DecodedModel from open.

      • bytes: Uint8Array

        The full container bytes (same buffer passed to open).

      • Optionalopts: DecodeOptions

        Optional DecodeOptions (backend / abort / onTile).

      Returns AsyncIterable<DecodedTile>

      An async iterable of DecodedTiles in container order.

      BitruviusError BVX_DECODE_FAILED on a corrupt tile; BVX_WORKER_SPAWN_BLOCKED when a worker backend cannot start.

    • Release the decoder's resources (worker pool, wasm instance).

      Returns void

    • Parse the container header (cheap — no per-tile decode).

      Parameters

      • bytes: Uint8Array

        The full container bytes.

      Returns Promise<DecodedModel>

      The DecodedModel (profile + dequant meta + tile count).

      BitruviusError BVX_DECODE_FAILED on bad magic / truncation / unsupported version.