Couchbase .NET SDK __CB_SDK_VERSION__

Show / Hide Table of Contents

Interface ICompressionAlgorithm

Interface for an implementation of a compression algorithm used to compress/decompress request and response bodies for key/value operations.

Namespace: Couchbase.Core.IO.Compression
Assembly: Couchbase.NetClient.dll
Syntax
[InterfaceStability(Level.Volatile)]
public interface ICompressionAlgorithm

Properties

View Source

Algorithm

Compression algorithm implemented by this class.

Declaration
CompressionAlgorithm Algorithm { get; }
Property Value
Type Description
CompressionAlgorithm

Methods

View Source

Compress(ReadOnlyMemory<byte>)

Compresses an input buffer.

Declaration
IMemoryOwner<byte> Compress(ReadOnlyMemory<byte> input)
Parameters
Type Name Description
ReadOnlyMemory<byte> input

Buffer to compress.

Returns
Type Description
IMemoryOwner<byte>

A compressed buffer. Ownership of the buffer is passed to the caller.

View Source

Decompress(ReadOnlyMemory<byte>)

Decompresses an input buffer.

Declaration
IMemoryOwner<byte> Decompress(ReadOnlyMemory<byte> input)
Parameters
Type Name Description
ReadOnlyMemory<byte> input

Buffer to compress.

Returns
Type Description
IMemoryOwner<byte>

A compressed buffer. Ownership of the buffer is passed to the caller.

Remarks

May throw an exception if the input buffer is not valid.

  • View Source
In this article
Back to top Copyright © 2020 Couchbase, Inc. All rights reserved.