Interface ICompressionProvider
Provides a specific compression implementation to compress gRPC messages.
Namespace: Grpc.Net.Compression
Assembly: Grpc.Net.Common.dll
Syntax
public interface ICompressionProvider
Properties
EncodingName
The encoding name used in the 'grpc-encoding' and 'grpc-accept-encoding' request and response headers.
Declaration
string EncodingName { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
CreateCompressionStream(Stream, Nullable<CompressionLevel>)
Create a new compression stream.
Declaration
Stream CreateCompressionStream(Stream stream, CompressionLevel? compressionLevel)
Parameters
Type | Name | Description |
---|---|---|
Stream | stream | The stream that compressed data is written to. |
System.Nullable<CompressionLevel> | compressionLevel | The compression level. |
Returns
Type | Description |
---|---|
Stream | A stream used to compress data. |
CreateDecompressionStream(Stream)
Create a new decompression stream.
Declaration
Stream CreateDecompressionStream(Stream stream)
Parameters
Type | Name | Description |
---|---|---|
Stream | stream | The stream that compressed data is copied from. |
Returns
Type | Description |
---|---|
Stream | A stream used to decompress data. |