Skip to content
@drupflare/spool v1.0.0 GitHub
    Preparing search index...

    Function buildPack

    • Encodes a state as a pack: an index frame, then one frame per block in table order. Empty tables are left out. Throws bad-bundle for a repeated key, a block size under one, or a block over maxFrameBytes or MAX_BUNDLE_BLOCK_BYTES, which a reader would refuse.

      Parameters

      • state: BundleState
      • blockRows: number = BLOCK_ROWS
      • maxFrameBytes: number = MAX_BUNDLE_FRAME_BYTES

      Returns Promise<{ bytes: Bytes; index: BundleIndex }>