File Compression Flashcards
File Compression
Lossless Compression
A compression algorithm that doesn’t affect the original data. In other words, the uncompressed file will be exactly the same as the file before compression, bit for bit. Common lossless file types include:
Lossy Compression
A compression algorithm that slightly alters the data to make it easier to store. Lossy compression takes advantage of the limitations of human sight and hearing, and is usually used for images, videos, and audio files. Common lossy file types include:
Run-Length Encoding
A common lossless compression algorithm. Instead of storing each individual bit of a file, it stores how many of each bit appears in a sequence. For example, instead of storing thirty zeros in a row, it would just store the number thirty, followed by a zero. It can also store repeated patterns in data, such as identical pixels in an image.
Compression Artifact
Sometimes, when a video is compressed to a very small size, patches of pixels appear that have less visible detail than the rest of the image. These are called compression artifacts. They often appear in educational videos (such as the ones in this course) because file size is prioritized over video sharpness, which allows the videos to stream well on suboptimal hardware.