CompressionLevel

CompressionLevel class

Specifies ZIP compression levels for OpenXML file. Higher levels provide better compression at the cost of slower processing.

Constants

NameValueDescription
None0No compression is applied. Files are stored as-is.
Level11Fastest compression with the lowest compression ratio.
Level22Faster compression with slightly better compression ratio than CompressionLevel#Level1.
Level33Provides better compression than CompressionLevel#Level2 with moderate performance impact.
Level44Provides better compression than CompressionLevel#Level3.
Level55Provides improved compression over CompressionLevel#Level4 with additional processing time.
Level66Standard compression, offering a good balance between compression speed and file size. The default compression level.
Level77Provides higher compression than CompressionLevel#Level6 with slower processing.
Level88Provides higher compression than CompressionLevel#Level7.
Level99Maximum compression. Produces the smallest file size with the slowest processing speed.

None

No compression is applied. Files are stored as-is.


Level1

Fastest compression with the lowest compression ratio.


Level2

Faster compression with slightly better compression ratio than CompressionLevel#Level1.


Level3

Provides better compression than CompressionLevel#Level2 with moderate performance impact.


Level4

Provides better compression than CompressionLevel#Level3.


Level5

Provides improved compression over CompressionLevel#Level4 with additional processing time.


Level6

Standard compression, offering a good balance between compression speed and file size. The default compression level.


Level7

Provides higher compression than CompressionLevel#Level6 with slower processing.


Level8

Provides higher compression than CompressionLevel#Level7.


Level9

Maximum compression. Produces the smallest file size with the slowest processing speed.