/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { TreeFieldStoredSchema, ITreeCursorSynchronous, StoredSchemaCollection, TreeNodeSchemaIdentifier } from "../../../core";
import { FieldKind, FullSchemaPolicy } from "../../modular-schema";
import { EncodedChunk } from "./format";
import { EncoderCache, FieldEncoder, FieldShaper, TreeShaper } from "./compressedEncode";
import { NodeShape } from "./nodeShape";
/**
 * Encode data from `cursor` 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, cursor: ITreeCursorSynchronous): EncodedChunk;
export declare function buildCache(schema: StoredSchemaCollection, policy: FullSchemaPolicy): EncoderCache;
export declare function getFieldKind(fieldSchema: TreeFieldStoredSchema): FieldKind;
/**
 * 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