Compression streams: Overview
All Easy Compression Library (ECL) streams are 100% compatible with standard TStream interface and it is very simple to replace standard streams to ECL streams in the application code. All ECL streams support:
-
Both forward and backward seeks
-
Setting and getting Size property
-
Read and Write any portion of data to the same stream
Moreover a lot of additional useful features are added, such as transparent compression, (i.e. ECL streams compress and decompress data on the fly), encryption, progress indication, etc.
TECLFileStream is a replacement of standard TFileStream and it provides all standard methods and properties of TFileStream.
TECLMemoryStream does the same for TMemoryStream.
TECLStream is intended to add compression and encryption capabilities to any TStream descendant.
Compression in ECL streams is transparent, so you usually deal with data decompressed on the fly. However you could get direct access to compressed data using a stream interface.
You can also read about memory consumption of the ECL streams.
|