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
public interface ICompressionAlgorithm
Properties
| Improve this Doc View SourceAlgorithm
Compression algorithm implemented by this class.
Declaration
CompressionAlgorithm Algorithm { get; }
Property Value
Type | Description |
---|---|
CompressionAlgorithm |
Methods
| Improve this Doc View SourceCompress(ReadOnlyMemory<Byte>)
Compresses an input buffer.
Declaration
IMemoryOwner<byte> Compress(ReadOnlyMemory<byte> input)
Parameters
Type | Name | Description |
---|---|---|
ReadOnlyMemory<System.Byte> | input | Buffer to compress. |
Returns
Type | Description |
---|---|
IMemoryOwner<System.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<System.Byte> | input | Buffer to compress. |
Returns
Type | Description |
---|---|
IMemoryOwner<System.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.