CompressionLevel

CompressionLevel

is an option for Export and CreateArchive that specifies the amount of compression to use when compressing data.

Details

  • Typical settings for CompressionLevel include:
  • Automaticautomatically chosen
    vala number between 0 (less compression) and 1 (more compression)
  • Using CompressionLevelAutomatic, typically a balance between speed and data size is chosen.

Examples

open allclose all

Basic Examples  (1)

Export an audio object to an MP3 file with default compression:

Use maximum compression:

Use minimum compression:

Scope  (4)

Image Compression  (2)

Export an image object to a JPEG file with default compression:

Use maximum compression:

Use minimum compression:

Check file size before compression:

Some compression is performed by default:

Delete the resulting archives:

Specify to use no compression:

Delete the resulting archives:

Specify to use maximal compression:

Delete the resulting archives:

Audio Compression  (1)

Export an audio object to an MP3 file with default compression:

Use maximum compression:

Use minimum compression:

Video Compression  (1)

Use the CompressionLevel option to control the file size of a video operation:

Compare file sizes using different compression levels:

Wolfram Research (2020), CompressionLevel, Wolfram Language function, https://reference.wolfram.com/language/ref/CompressionLevel.html.

Text

Wolfram Research (2020), CompressionLevel, Wolfram Language function, https://reference.wolfram.com/language/ref/CompressionLevel.html.

CMS

Wolfram Language. 2020. "CompressionLevel." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/CompressionLevel.html.

APA

Wolfram Language. (2020). CompressionLevel. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/CompressionLevel.html

BibTeX

@misc{reference.wolfram_2024_compressionlevel, author="Wolfram Research", title="{CompressionLevel}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/CompressionLevel.html}", note=[Accessed: 22-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_compressionlevel, organization={Wolfram Research}, title={CompressionLevel}, year={2020}, url={https://reference.wolfram.com/language/ref/CompressionLevel.html}, note=[Accessed: 22-November-2024 ]}