Internet Direct (Indy)
Home
PreviousUpNext
TIdCompressionLevel Type
Pascal
TIdCompressionLevel = 0..9;

TIdCompressionLevel is an enumerated type that represents the compression level values for the ZLIB compression library. 

TIdCompressionLevel is passed as a parameter to methods in TIdZLibCompressorBase to indicate the compression level flags written to a stream during compression, or expected during decompression. 

TIdCompressionLevel indicates the balance of algorithm speed and maximum compression required for the operation, and are available for use by specific compression methods ("deflate" or "gzip"). 

The "deflate" method uses the following compression levels values: 

 

Level 
Meaning 
compressor uses fastest algorithm 
compressor uses fast algorithm 
compressor uses default algorithm 
compressor uses maximum compression, slowest algorithm 

 

The "gzip" method uses the following compression levels values: 

 

Level 
Meaning 
no compression is used 
uses fastest algorithm, worst compression 
uses slower algorithm, better compression 
uses slower algorithm, better compression 
uses slower algorithm, better compression 
uses slower algorithm, better compression 
uses slower algorithm, better compression 
uses slower algorithm, better compression 
uses slower algorithm, better compression 
uses slowest algorithm, best compression 

 

A compression level value of 1 will usually give good speed with good compression. A higher compression level value may yield better performance when bandwith is at a premium because the total data transfer time is given by the sum of compression time + download time + decompression time. 

Please note that TIdCompressionLevel is not required for decompression; it is used to indicate if recompression might be worthwhile.

Internet Direct (Indy) version 10.1.5
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Website http://www.indyproject.org.
Post feedback to the Indy Documentation newsgroup.