/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { FieldStoredSchema, ITreeCursorSynchronous, SchemaData, TreeSchemaIdentifier } 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.
 */
export declare function schemaCompressedEncode(schema: SchemaData, policy: FullSchemaPolicy, cursor: ITreeCursorSynchronous): EncodedChunk;
export declare function buildCache(schema: SchemaData, policy: FullSchemaPolicy): EncoderCache;
export declare function getFieldKind(fieldSchema: FieldStoredSchema): FieldKind;
/**
 * Selects shapes to use to encode fields.
 */
export declare function fieldShaper(treeHandler: TreeShaper, field: FieldStoredSchema, cache: EncoderCache): FieldEncoder;
/**
 * Selects shapes to use to encode trees.
 */
export declare function treeShaper(fullSchema: SchemaData, policy: FullSchemaPolicy, fieldHandler: FieldShaper, schemaName: TreeSchemaIdentifier): NodeShape;
export declare function oneFromSet<T>(set: ReadonlySet<T> | undefined): T | undefined;
//# sourceMappingURL=schemaBasedEncoding.d.ts.map