ICompressor
Defines a contract for compressing and decompressing data streams to optimize storage and transmission.
Definition
Namespace:Telerik.Reporting.Services.Engine
Assembly:Telerik.Reporting.dll
Syntax:
public interface ICompressor
Properties
EncodingType
string
Gets the encoding type identifier that represents the compression algorithm used by this compressor.
string EncodingType { get; }
A string that identifies the compression encoding type (e.g., "gzip", "deflate"). This value is used to identify the appropriate decompressor when reading compressed data.
Methods
Compresses data from the source stream and writes the compressed result to the destination stream.
void Compress(Stream source, Stream destination)
The input stream containing the data to be compressed.
destinationStreamThe output stream where the compressed data will be written.
This method reads data from the source stream, applies the compression algorithm, and writes the compressed output to the destination stream. Both streams should be properly positioned before calling this method.
Decompresses data from the source stream and writes the uncompressed result to the destination stream.
void Decompress(Stream source, Stream destination)
The input stream containing the compressed data to be decompressed.
destinationStreamThe output stream where the decompressed data will be written.
This method reads compressed data from the source stream, applies the decompression algorithm, and writes the uncompressed output to the destination stream. The source stream must contain data that was compressed using the same algorithm as this compressor.