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
| Edit this page View SourceAlgorithm
Compression algorithm implemented by this class.
Declaration
CompressionAlgorithm Algorithm { get; }
Property Value
Type | Description |
---|---|
CompressionAlgorithm |
Methods
| Edit this page View SourceCompress(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. |
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.