/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { TreeFieldStoredSchema, StoredSchemaCollection, TreeNodeSchemaIdentifier } from "../../../core/index.js";
import { FullSchemaPolicy } from "../../modular-schema/index.js";
import { EncodedFieldBatch } from "./format.js";
import { EncoderCache, FieldEncoder, FieldShaper, TreeShaper } from "./compressedEncode.js";
import { NodeShape } from "./nodeShape.js";
import { FieldBatch } from "./fieldBatch.js";
/**
 * 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): EncodedFieldBatch;
export declare function buildCache(schema: StoredSchemaCollection, policy: FullSchemaPolicy): EncoderCache;
/**
 * Selects shapes to use to encode fields.
 */
export declare function fieldShaper(treeHandler: TreeShaper, field: TreeFieldStoredSchema, cache: EncoderCache): 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