import { ExportNode } from "./types.cjs"; //#region src/export/compress.d.ts /** * Interface for node exporters. * Based on Go compress.go lines 8-10 */ interface NodeExporter { next(): Promise; } /** * Interface for node importers. * Based on Go compress.go lines 12-14 */ interface NodeImporter { add(node: ExportNode): Promise; } /** * CompressExporter wraps the normal exporter to apply compressions: * - Branch keys are skipped * - Leaf keys are encoded with delta compared with the previous leaf * - Branch node versions are encoded with delta compared with max version in children * * Based on Go compress.go lines 16-30 */ declare class CompressExporter implements NodeExporter { private inner; private lastKey; private versionStack; constructor(exporter: NodeExporter); next(): Promise; } /** * CompressImporter wraps the normal importer to decompress before import. * * Based on Go compress.go lines 57-69 */ declare class CompressImporter implements NodeImporter { private inner; private lastKey; private minKeyStack; private versionStack; constructor(importer: NodeImporter); add(node: ExportNode): Promise; } /** * Create a compress exporter that wraps an async iterable exporter. */ declare function createCompressExporter(exporter: AsyncIterable): AsyncIterable; //#endregion export { CompressExporter, CompressImporter, NodeExporter, NodeImporter, createCompressExporter }; //# sourceMappingURL=compress.d.cts.map