Delphi Database, Delphi Components from ComponentAce
Products Download Order Contact us
/img/help/home.gif /img/help/prev.gif /img/help/next.gif

 

Compressing a custom stream

Example1            Example2


 

Easy Compression Library provides two ways to compress and decompress any stream data.

  • To compress/decompress the whole data stream to the other destination stream you could use ECLCompressStream/ECLDecompressStream functions.
  • To store compressed data in a custom stream (such as TBlobStream, TStringStream, ...) keeping a stream interface with transparent decompression you could use TECLStream.
  •  

    Compressing/decompressing a whole data stream.

    To compress and optionally encrypt a stream data you need to call ECLCompressStream function with source and destination streams and two other optional parameters: Password and CompressionLevel.

    If the stream is not to be encrypted, the Password parameter must be blank.

    CompressionLevel parameter should be not equal to eclNone value to compress or encrypt the data.

    To decompress (and decrypt) a stream data you need to call ECLDecompressStream.

    See also Example1.

     

    Compressing/decompressing any data stream on the fly.

    To compress/decompress and optionally encrypt/decrypt a stream data with the following access through a stream interface you need to create TECLStream object with a source stream parameter and three other optional parameters: bCreate, Password and CompressionLevel.

    bCreate indicates whether to clear the source stream data.

    If the stream is not to be encrypted, the Password parameter must be blank.

    CompressionLevel parameter should be not equal to eclNone value to compress or encrypt the data.

    To access a data compressed/decompressed on the fly using a stream interface you should use TECLStream methods and properties.

    See also Example2.

     

     

        © 2003 - 2024 ComponentAce  | .net zip component | barcode for .net | delphi zip component | delphi database Mar 29, 2024