Whenever you’re space-constrained with your files, whether that’s for storage purposes or for sharing them online, it’s important to know what types of compression are available and how these affect the final file. While it’s true enough that Windows 11 has inbuilt ZIP functionality, it’s rather limited in scope, and if your file is already compressed like video or photo files often are, then zipping them could even make the finished file larger. In the push for efficiency in storage, you need to know which codecs you can use for different file types and how they affect the compression ratio. It’s also helpful to know what they do to the overall quality of the file, as you wouldn’t want to introduce distortion, artifacts, or glitched data.
Related
Mastering Windows efficiency: I automate my PC with these software solutions
Achieve peak efficiency with simple, powerful tools designed to simplify your digital routine
4 Image file compression
Most image files can be compressed further with minimal loss of fidelity
Image compression has been around for a long time, originally designed to make file sizes more manageable by a consortium of photographic experts. The humble JPEG has been a fixture of life for three decades now, and even with new options, is still the reigning champ for its balance of file size, image quality, support, and ease of conversion to other formats. Some other good options for efficient image storage include:
- WebP: Based on the VP8 video codec, this web-first file format maintains image quality and can support transparency, something JPEG can not.
- HEIC/HEIF: This is the efficient format that iOS and Android employ in its camera apps, but it’s not very well-supported by other devices.
- AVIF: Based on AV1, this open-source codec is great for image quality and efficiency, but it’s not supported by many devices or image tools.
- JPEG XL: Designed to replace JPEG, it never received the support it needed to keep up with the formats pushed by web browser manufacturers.
- PNG: This is an efficient format designed for web-shared images. It supports transparency but often has lower visual quality than other formats.
It’s perhaps telling that even decades after its invention, the JPEG format is still the go-to for most users when saving efficient image files. It supports progressive encoding for varying quality, but I wouldn’t use lower than 65% or more than about 85% for most uses. Other formats can be useful in the right situation, but there still isn’t a viable replacement for the same visual needs.
Related
I don’t use Photoshop, here are the 6 image editors I use instead
I don’t let Photoshop rule my workflow, and neither should you
3 Video file compression
Lossless video is huge but you don’t need all that data for the finished product
Have you ever noticed your smartphone and cloud storage plan gets full really quickly when you take lots of videos of your family? Even when using the more efficient video codecs on modern smartphones, video files are large, so it pays to know which codecs are best for efficiency. You don’t want to shrink the files too far and realize that you’ve lost all the detail in the image in the process. The most common video codecs are below, with why you’d want to use each option:
- H.265 (HEVC): One of the more efficient codecs, but it needs a license fee to be used, so other options might be better.
- AV1: The most efficient codec for compressing video while retaining visual fidelity.:
- H.264: The most common and widely supported video codec, H.264 is lossy but not as efficient as other options.
- VP8/VP9: Mostly used by YouTube and web browsers, these efficient and lossy codecs are commonly used by streaming services and not the content creator.
- Apple ProRes: This “visually lossless” codec is aimed at post-production use, so it creates huge file sizes to keep as much data as possible.
Video codecs aren’t the same as video formats. Think of the codec as the algorithm that does the encoding, while the format is the container that holds the video and audio codecs, and any other data necessary for the full video file to play successfully.
The most efficient codecs aren’t always the best supported, but that’s starting to change as AV1 gets hardware and software support in most new devices. For the best mix of efficiency and usability, H.264 is still the gold standard.
Related
Which video codec should you use for rendering and why
Choosing the correct video codec for your final file is important so you get the right balance of file size and quality for your needs
2 Audio file compression
Our ears are weird, and compression exploits that
If you’ve ever wondered why DVDs and Blu-rays needed multiple layers of optical recording tracks for content with multichannel audio, it’s because audio files are notorious for being large, and difficult to compress with any level of fidelity. Our ears are highly tuned instruments, but because of the way our brain processes the data from our eardrums, they can be tricked. Audio codecs for compression come in two forms: Lossy, where some of the original data is lost in the process, and Lossless, where all the data is recovered when it is decompressed. Sure, you want Lossless codecs for peak fidelity, but for efficient file sizes, lossy is the way to go.
Lossy:
- MP3: The most popular lossy format can be up to a tenth the size of lossless files when compressed. Most of the audio frequencies it drops are inaudible to our hearing, but it is limited to 16-bit depth, so it’s only suitable for playback and not recording or mixing.
- AAC: Advanced Audio Coding sounds better than MP3 and is great for streaming audio, which is why it’s the codec Apple usually uses.
- Ogg Vorbis: Spotify uses this codec for its lossy streams. The open-source codec is more efficient than MP3 but can result in less fidelity.
- WMA: Windows Media Player’s encoding codec is similar to MP3, but Microsoft’s version. It also has a lossless version, but it’s not widely supported, and WMP is also going out of favor.
- Opus: This lossy format is designed for voice or music streaming over the internet, but it can be used for efficient storage as it supports a wide range of bitrates and sample rates.
Lossless:
- FLAC: Free Lossless Audio Codec is the gold standard for lossless codecs. It’s widely supported, can shrink files by up to one-half, and is royalty-free, so anyone can use it in their programs.
- ALAC: Apple’s Lossless Audio Codec is the new format used in Apple Music lossless files. It’s been made open source and royalty-free, and it’s the only lossless format Apple Music can use.
Multi-channel:
- Dolby Digital: Most video content made with surround-sound audio uses some form of Dolby technology to compress the audio files to manageable sizes. It’s compressed and lossy, but it does provide spatial positioning for the audio tracks.
- AAC 5.1: Similar to AAC for stereo files, but is mostly used in Europe as an alternative to Dolby’s licensing costs.
- DTS: It comes in both lossy and lossless formats and is similar to the aptX audio codec, which shrinks audio to sizes that Bluetooth connections can handle.
If you want low file sizes for listening, AAC is probably your best bet these days. It creates files similar in size to MP3, but they sound better. There are also several uncompressed audio codecs, like WAV, AIFF, and DSD, that you’d use for either the best quality playback or while you’re editing the files. You won’t want to use these file types on storage-constrained mobile devices, but they have a place when creating content.
Related
Guide to lossless audio: Everything you need to know from a smartphone user perspective
It’s more complicated than flipping a switch in an app.
1 Data file compression
It’s truly magical how small some files can be
Since text files and the like have a ton of whitespace in them, modern compression algorithms can shrink them to some stupendously small sizes. Even older compression algorithms can do a pretty good job, which gives you a choice of formats depending on your needs. You’ll want to think about things like how long it will take to compress (and decompress for the other user), whether the tool is easy to use and get hold of, and if you want lossless compression for mission-critical data. Here’s a selection of common formats and why you’d want to use them:
- 7-Zip: The most efficient compression ratio, and one of the fastest in practice.
- ZIP: A lossless, dictionary-based method that can be encrypted and uses multiple compression levels.
- LZ4: Extremely fast, lossless compression algorithm.
- RAR: Similar speeds to 7-Zip for decompression and compression.
- ARC: Rarely used but was designed for high compression and fast operation.
Any of these will work in practice, and since 7-Zip is an easy-to-use compression tool, any of the formats that it supports are good choices for efficient file compression.
Related
6 best file compression tools for Windows PCs
Compressing your files makes them easier to share
Modern file compression is often quite magical, but it helps to know which tools and formats to use
These are the most common types of files you’d want to compress, but there are many others that we use daily without thinking about it. Mobile apps are compressed with a ZIP-like structure, and PC games have their code, textures, and other assets compressed while being transferred from Steam and other storefronts to your computer and also after they’re installed. Some file types are easier to compress than others, especially when they can use known psychological and physiological tricks to make it seem like the compression isn’t there. Whatever file you start with, there’s often a more efficient codec to try, but it might not be the best for your needs.
#common #file #compression #tasks #improve #efficiency
source: https://www.xda-developers.com/4-file-compression-tasks-and-how-to-improve-their-efficiency/


