IFClite TypeScript API
    Preparing search index...

    Append-only file-per-room persistence.

    Update layout: each append() writes one frame [length:u32][bytes] to <dataDir>/<sanitizedRoomId>.log. load() reads the file and returns the concatenated payload.

    Compaction rewrites the log atomically by writing to a temp file then renaming.

    Implements

    Index
    • Append update to roomId's log.

      Parameters

      • roomId: string
      • update: Uint8Array

      Returns Promise<void>

    • Replace the room's log with a freshly compacted state (called periodically).

      Parameters

      • roomId: string
      • mergedState: Uint8Array

      Returns Promise<void>

    • Hard-delete a room.

      Parameters

      • roomId: string

      Returns Promise<void>

    • Load any saved updates for roomId and return them as a single merged blob.

      Parameters

      • roomId: string

      Returns Promise<Uint8Array<ArrayBufferLike> | null>

    • Read one log by its FILE path, without mapping a room id to a name. For callers that enumerate the data dir (the blob-GC scan) and must read a file whose name is not a well-formed encodeURIComponent output. Same result contract as load: null for an empty or unparseable log. Set requireComplete for GC: an incomplete suffix may hide blob references. The default retains complete-prefix recovery for ordinary room loads.

      Parameters

      • file: string
      • OptionalrequireComplete: boolean

      Returns Promise<Uint8Array<ArrayBufferLike> | null>