InterfaceICompressor
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
Gets the encoding type identifier that represents the compression algorithm used by this compressor.
Declaration
string EncodingType { get; }
Property Value
string
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
Compress(Stream, Stream)
Compresses data from the source stream and writes the compressed result to the destination stream.
Declaration
void Compress(Stream source, Stream destination)
Parameters
source
Stream
The input stream containing the data to be compressed.
destination
Stream
The output stream where the compressed data will be written.
Remarks
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.
Decompress(Stream, Stream)
Decompresses data from the source stream and writes the uncompressed result to the destination stream.
Declaration
void Decompress(Stream source, Stream destination)
Parameters
source
Stream
The input stream containing the compressed data to be decompressed.
destination
Stream
The output stream where the decompressed data will be written.
Remarks
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.