/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { ITelemetryLogger } from "@fluidframework/common-definitions";
import { IsoBuffer } from "@fluidframework/common-utils";
import { IFluidHandle, IFluidSerializer } from "@fluidframework/core-interfaces";
import { ISequencedDocumentMessage, ITree } from "@fluidframework/protocol-definitions";
import * as MergeTree from "./mergeTree";
import * as ops from "./ops";
import { MergeTreeChunkLegacy } from "./snapshotChunks";
export interface SnapChunk {
    /**
     * Offset from beginning of segments.
     */
    position: number;
    lengthBytes: number;
    sequenceLength: number;
    buffer?: IsoBuffer;
}
export interface SnapshotHeader {
    chunkCount?: number;
    segmentsTotalLength: number;
    indexOffset?: number;
    segmentsOffset?: number;
    seq: number;
    minSeq?: number;
}
export declare class SnapshotLegacy {
    mergeTree: MergeTree.MergeTree;
    filename?: string | undefined;
    onCompletion?: (() => void) | undefined;
    static readonly header = "header";
    static readonly body = "body";
    static readonly catchupOps = "catchupOps";
    static readonly sizeOfFirstChunk: number;
    header: SnapshotHeader | undefined;
    seq: number | undefined;
    buffer: IsoBuffer | undefined;
    pendingChunk: SnapChunk | undefined;
    segments: ops.IJSONSegment[] | undefined;
    segmentLengths: number[] | undefined;
    logger: ITelemetryLogger;
    private readonly chunkSize;
    constructor(mergeTree: MergeTree.MergeTree, logger: ITelemetryLogger, filename?: string | undefined, onCompletion?: (() => void) | undefined);
    getSeqLengthSegs(allSegments: ops.IJSONSegment[], allLengths: number[], approxSequenceLength: number, startIndex?: number): MergeTreeChunkLegacy;
    /**
     * Emits the snapshot to an ITree. If provided the optional IFluidSerializer will be used when serializing
     * the summary data rather than JSON.stringify.
     */
    emit(catchUpMsgs: ISequencedDocumentMessage[], serializer: IFluidSerializer, bind: IFluidHandle): ITree;
    extractSync(): ops.IJSONSegment[];
}
//# sourceMappingURL=snapshotlegacy.d.ts.map