File compression
IntroducedIn this lesson
| English | Meaning |
|---|---|
| compression/kəmˈpreʃn/ | Squeezing an object or substance so that its size or volume decreases. |
| attachment limit | |
| bandwidth/ˈbændwɪdθ/ | The frequency range carried by a signal or channel; in networking, often used for its data transfer capacity. |
| resolution/ˌrezəˈluːʃn/ | The ability to distinguish fine detail or closely separated features. |
Too big to send
- Big files fill drives and fail to send. Compression 压缩 makes them smaller.
Why reduce size?
| storage | transmission |
|---|---|
| less space used | faster upload and download |
| more files fit | attachment limits 附件大小限制 met |
| smaller backups | less data and bandwidth 带宽 |
Why reduce file sizes for transmission?
Difficulty 2/5 · 140 coins + a small bonus on first completion today
Compression never improves quality.
Archives
- .zip and .rar compress one or many files into a single archive; files are usually extracted before use.
- An archive also keeps files together, like all of a website's pages.
Match each file to the compression usually used.
Difficulty 2/5 · 140 coins + a small bonus on first completion today
Programs and data must be restored exactly.
Lossy compression lets you restore the original exactly.
Difficulty 1/5 · 100 coins + a small bonus on first completion today
Some data is removed permanently.
What does a .zip archive do?
Difficulty 1/5 · 100 coins + a small bonus on first completion today
It also keeps files together.
Lossless and lossy
| lossless | lossy |
|---|---|
| original restored exactly | data removed permanently |
| text, programs, .zip, .png | photos, music, video: .jpg, .mp3 |
| smaller reduction | often greater reduction |
40 photos, 120 MB, with a 25 MB email limit: zip them and lower the resolution 分辨率 to reach 18 MB.
A student must email 40 photos totalling 120 MB, but the limit is 25 MB. Describe two ways to reduce the size.
Combine compression with smaller images.
Never use lossy compression for programs or data. Losing even one byte breaks them.
Smaller files save storage and send faster. Lossless keeps every bit (text, programs); lossy removes data for bigger savings (photos, sound, video).
What went wrong? Only the site team sees this.