IFClite TypeScript API
    Preparing search index...

    Type Alias IfcSourceTransfer

    IfcSourceTransfer:
        | { bytes: Uint8Array; contentKey: string
        | null; kind: "contiguous" }
        | {
            blocks: Uint8Array;
            blockSize: number;
            contentKey: string;
            index: Uint32Array;
            kind: "blocked";
            storedMask: Uint8Array;
            totalLength: number;
        }

    Structured-clone-safe description of a source, for handing it to a worker WITHOUT materialising it on the sending side.

    blocked is declared here but not yet produced; it is the shape the compressed implementation will post.

    Type Declaration

    • { bytes: Uint8Array; contentKey: string | null; kind: "contiguous" }
    • {
          blocks: Uint8Array;
          blockSize: number;
          contentKey: string;
          index: Uint32Array;
          kind: "blocked";
          storedMask: Uint8Array;
          totalLength: number;
      }
      • blocks: Uint8Array
      • blockSize: number
      • contentKey: string

        Required, unlike the contiguous arm's nullable key. A contiguous receiver can recompute a missing key with one linear pass over bytes it already holds; a blocked one would have to inflate every block to do it. Making it non-nullable here forces the compression swap to compute and carry the key eagerly, while the source is still contiguous.

      • index: Uint32Array
      • kind: "blocked"
      • storedMask: Uint8Array
      • totalLength: number