/*! * Copyright (c) Microsoft Corporation and contributors. All rights reserved. * Licensed under the MIT License. */ /** * Available compression algorithms for op compression. * @legacy @beta */ export enum CompressionAlgorithms { lz4 = "lz4", } /** * Options for op compression. * @legacy @beta */ export interface ICompressionRuntimeOptions { /** * The value the batch's content size must exceed for the batch to be compressed. * By default the value is 600 * 1024 = 614400 bytes. If the value is set to `Infinity`, compression will be disabled. */ readonly minimumBatchSizeInBytes: number; /** * The compression algorithm that will be used to compress the op. * By default the value is `lz4` which is the only compression algorithm currently supported. */ readonly compressionAlgorithm: CompressionAlgorithms; } /** * @legacy @beta */ export const disabledCompressionConfig: ICompressionRuntimeOptions = { minimumBatchSizeInBytes: Number.POSITIVE_INFINITY, compressionAlgorithm: CompressionAlgorithms.lz4, }; export const enabledCompressionConfig = { // Batches with content size exceeding this value will be compressed minimumBatchSizeInBytes: 614400, compressionAlgorithm: CompressionAlgorithms.lz4, } as const satisfies ICompressionRuntimeOptions;