import type { Frame } from "../frames/contract.js";
/** Writes a track's file into a spool, its head as soon as it starts. */
export interface Assembler {
    add(frame: Frame): void;
    end?(): void;
}
/**
 * A file's bytes in the order they are written, held until they are drained.
 *
 * Small writes are batched, so a line takes no array of its own.
 */
export declare class Spool {
    #private;
    /** The chunk the last `reserve` made room in. */
    get chunk(): Uint8Array;
    /** What waits to be drained, a text counted by its length. */
    get waiting(): number;
    /** Where `size` more bytes go in `chunk`. */
    reserve(size: number): number;
    write(text: string): void;
    /** A piece held as it is, for a file made of pieces alone. */
    put(piece: Uint8Array): void;
    /** What was written since the last drain, as one array. */
    drain(): Uint8Array<ArrayBuffer>;
}
