/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { type StoredSchemaCollection, type TreeFieldStoredSchema, type TreeNodeSchemaIdentifier } from "../../../core/index.js";
import type { FullSchemaPolicy } from "../../modular-schema/index.js";
import { EncoderCache, type FieldEncoder, type FieldShaper, type TreeShaper } from "./compressedEncode.js";
import type { FieldBatch } from "./fieldBatch.js";
import { type EncodedFieldBatch } from "./format.js";
import { NodeShape } from "./nodeShape.js";
import type { IIdCompressor } from "@fluidframework/id-compressor";
/**
 * Encode data from `fieldBatch` in into an `EncodedChunk`.
 *
 * Optimized for encoded size and encoding performance.
 * TODO: This function should eventually also take in the root FieldSchema to more efficiently compress the nodes.
 */
export declare function schemaCompressedEncode(schema: StoredSchemaCollection, policy: FullSchemaPolicy, fieldBatch: FieldBatch, idCompressor: IIdCompressor): EncodedFieldBatch;
export declare function buildCache(schema: StoredSchemaCollection, policy: FullSchemaPolicy, idCompressor: IIdCompressor): EncoderCache;
/**
 * Selects shapes to use to encode fields.
 */
export declare function fieldShaper(treeHandler: TreeShaper, field: TreeFieldStoredSchema, cache: EncoderCache, storedSchema: StoredSchemaCollection): FieldEncoder;
/**
 * Selects shapes to use to encode trees.
 */
export declare function treeShaper(fullSchema: StoredSchemaCollection, policy: FullSchemaPolicy, fieldHandler: FieldShaper, schemaName: TreeNodeSchemaIdentifier): NodeShape;
export declare function oneFromSet<T>(set: ReadonlySet<T> | undefined): T | undefined;
//# sourceMappingURL=schemaBasedEncoding.d.ts.map