Compression

From Soyjak Wiki, the free ensoyclopedia
Jump to navigationJump to search
Cobson after being JPEG compressed

Compression is the reduction of the size of information. It can be lossy or lossless. Compression is mainly used to reduce the amount of disk space taken up by files or to reduce the amount of information that needs to be transmitted and reduce latency.

Lossy compression

[edit | edit source]

Lossy compression reduces the size of a set of information by removing some of it. This makes files smaller at the cost of reducing their quality.

JPEG compression is one of the most common methods of lossy compression. It reduces the file size of images by removing certain information from them. It is most commonly used on consumer digital cameras because raw images take up a lot of space, especially with the higher resolutions of modern cameras.[1] JPEG is coal though because it doesn't support transparency.

Most video files you see on sites like YouTube are lossily compressed because uncompressed HD video can take up hundreds of gigabytes. The most common lossy codec is H.264, but new codecs like H.265, AV1, and VP9 are becoming more popular (they'll never replace H.264 doe because too many Selfish Little Fucks don't want to upgrade their systems).

Audio codecs like MP3 and AAC are lossy.

Lossless compression

[edit | edit source]
Comparison of lossless compression formats

Lossless compression reduces the size of data without removing any of it, so it's reversible. This allows for a smaller file size without compromising quality. It is accomplished by reducing redundancy. For example, if a piece of data says "DOCTOOOOOOOOOOOOOOOOOOOOS," it can be compressed by reducing it to something like "DOCT(20xO)S."

PNG and GIF images are a common example of lossless compression. They take up more space than JPEG images, but they are higher quality.

FLAC is the most common lossless audio format, though if you want audio in the highest quality possible you might as well go full WAV.

There are lossless formats that can reversibly compress any form of data. These include Gzip, Zstandard, bzip2, and xz. These are most commonly used in conjunction with archive formats such as Tar. Some archive formats such as ZIP and 7zip are compressed by default.

Snopes