Skip to main content

StreamCompressors

Assembly: ServiceStack.Client.dll
View Source
Declaration
public static class StreamCompressors

Methods

Set(String, IStreamCompressor)

Register a new compressor for a specific encoding (defaults: gzip, deflate, br*) .NET6+

View Source
Declaration
public static void Set(string encoding, IStreamCompressor compressor)
Parameters
TypeName
System.Stringencoding
ServiceStack.Caching.IStreamCompressorcompressor

SupportsEncoding(String)

Is there a compressor registered with this encoding?

View Source
Declaration
public static bool SupportsEncoding(string encoding)
Returns

System.Boolean

Parameters
TypeName
System.Stringencoding

Get(String)

return the registered IStreamCompressor implementation for for this

View Source
Declaration
public static IStreamCompressor Get(string encoding)
Returns

ServiceStack.Caching.IStreamCompressor

Parameters
TypeName
System.Stringencoding

GetRequired(String)

Assert there exists a IStreamCompressor for this encoding

View Source
Declaration
public static IStreamCompressor GetRequired(string encoding)
Returns

ServiceStack.Caching.IStreamCompressor

Parameters
TypeName
System.Stringencoding

Remove(String)

Remove compression support for this encoding

View Source
Declaration
public static bool Remove(string encoding)
Returns

System.Boolean

Parameters
TypeName
System.Stringencoding