| English | 의미 |
|---|---|
| compression/kəmˈpreʃn/ | 압축 |
| lossless/ˈlɒsləs/ | 무손실 |
| lossy/ˈlɒsi/ | 유손실 |
| bandwidth/ˈbændwɪdθ/ | 대역폭 |
| run-length encoding/rʌn leŋθ enˈkəʊdɪŋ/ | 런-레نگ스 인코딩 |
| dictionary coding/ˈdɪkʃənəri ˈkəʊdɪŋ/ | 사전 코딩 |
| Huffman coding/ˈhʌfmən ˈkəʊdɪŋ/ | 호프만 부호화 |
| spatial/ˈspeɪʃl/ | 공간적 |
| temporal/ˈtempərəl/ | 시간적 |
The three letters that made the web possible
- In 1987 a programmer named Phil Katz wrote a compression program and put the file format in the public domain. He called it ZIP. He was 24.
- Nothing about the web works without that idea. A single uncompressed second of HD video is about 187 MB; a two-hour film would be 1.3 terabytes. Streaming it over a home connection is arithmetically impossible.
- The films you watch are perhaps a thousandth of that, and they still look right, because the compression throws away things your eye was never going to notice.
- This lesson is compression 压缩: the two families, the three lossless methods, and how to justify one for a given file.
Lossless and lossy
- Compression reduces a file's size, saving storage space and transmission bandwidth 带宽, and making downloads and streams faster.
- Lossless 无损 compression is compression from which the original data can be recovered exactly. ZIP and PNG are lossless.
- Lossy 有损 compression permanently removes some data, so the original cannot be recovered. JPEG, MP3 and streamed video are lossy.

Recover exactly, or shrink much further
무손실 압축이란:
난이도 1/5 · 100 코인 + 오늘 첫 완료 시 소액 보너스
무손실 압축은 원본 데이터를 정확히 재건할 수 있게 해줍니다 — 텍스트, 프로그램 및 ZIP/PNG에 필수적입니다.
각 압축 개념을 그 의미를 매칭하세요.
난이도 2/5 · 140 코인 + 오늘 첫 완료 시 소액 보너스
무손실은 모든 비트를 유지합니다(텍스트/코드에 필요); 손실은 크기를 위해 품질을 타협합니다(사진, 오디오).
무손실 압축은 원본 데이터를 정확히 재건합니다(텍스트와 프로그램에 필요), 반면 손실 압축은 파일을 줄이기 위해 일부 데이터를 영구적으로 제거합니다(사진과 오디오에 사용).
난이도 1/5 · 100 코인 + 오늘 첫 완료 시 소액 보너스
그래서 프로그램이나 ZIP은 무손실이어야 하지만, 사진이나 노래는 손실 압축을 사용할 수 있습니다.
Worked example: justify the choice
- A company archives its accounting spreadsheets. Which kind of compression, and why? Lossless, because the spreadsheet must be restored exactly; a single changed value would make the accounts wrong.
- A photographer uploads holiday photographs to a phone gallery. Lossy, because the photographs are viewed on a small screen where the dropped detail is not visible, and the smaller files upload faster and use less storage.
- Name the kind, then give the reason from the situation. "Lossy is smaller" on its own is not a justification.
어떤 파일을 무손실로 압축해야 할까요?
난이도 1/5 · 100 코인 + 오늘 첫 완료 시 소액 보너스
소스 코드는 정확히 복구되어야 합니다 — 바뀐 문자 하나가 하나라도 있으면 고장 날 수 있으므로 — 무손실 압축이 필요합니다.
Run-length encoding
- Run-length encoding 行程编码 (RLE) replaces a run of repeated values with one value and a count: instead of eight identical white pixels, store "8, white".
- It is excellent on data with long runs, such as icons, diagrams, black-and-white scans and areas of flat colour.
- It is useless, and can make a file larger, on noisy data such as a photograph, where almost no two neighbouring values are equal.

Each row becomes counts and colours
런-length 인코딩은 다음 데이터에서 가장 잘 작동합니다:
난이도 1/5 · 100 코인 + 오늘 첫 완료 시 소액 보너스
RLE는 동일 값의 연쇄를 카운트 + 값으로 교체하므로 평탄한 영역에서는 탁월하지만 잡음 데이터에서는 쓸모가 없습니다.
Worked example: encode a row with RLE
- A row of an 8-pixel black-and-white image reads: white white white black black white white white. Encode it with RLE.
- Three white, two black, three white, so
3W 2B 3W, or as pairs,(3, 0) (2, 1) (3, 0)if white is 0. - Eight values became three pairs. Now encode
W B W B W B W B. Eight runs of one:1W 1B 1W 1B 1W 1B 1W 1B, which stores more than the original. That is exactly why RLE is not used on photographs.
런-length 인코딩(무손실 방식)
런-length 인코딩은 반복되는 값의 연쇄를 하나의 값과 카운트로 교체합니다. 이는 무손실입니다 — 원본이 정확히 복원됨 — 하지만 긴 연쇄를 가진 데이터만 축소시킵니다.
러너-렌스 인코딩을 사용하여 픽셀 행 W W W B B W W W를 인코딩하십시오. 형식 3W 2B 3W를 사용하십시오.
난이도 1/5 · 100 코인 + 오늘 첫 완료 시 소액 보너스
세 개의 흰색, 두 개의 검은색, 세 개의 흰색입니다. 여덟 개의 값이 세 쌍이 되지만, 교차하는 행은 여덟 쌍이 되어 커질 것입니다.
런-length 인코딩은 항상 파일을 작게 만듭니다.
난이도 1/5 · 100 코인 + 오늘 첫 완료 시 소액 보너스
연쇄가 없는 데이터, 예를 들어 사진이나 교차 패턴에서는 모든 연쇄의 길이가 하나이고 인코딩은 원본보다 더 많이 저장합니다.
Dictionary coding and Huffman coding
- Dictionary coding 字典编码, used by ZIP and PNG, builds a dictionary of repeated byte sequences and replaces each occurrence with a short index. It suits text and program code, where words and patterns recur.
- Huffman coding 霍夫曼编码 gives short codes to common symbols and long codes to rare ones, so the average code length falls. In "BANANA" the A is commonest and gets the shortest code.
- Both are lossless: the decoder rebuilds the original byte for byte.
Huffman 코딩은 다음을 통해 크기를 줄입니다:
난이도 1/5 · 100 코인 + 오늘 첫 완료 시 소액 보너스
Huffman는 가장 빈번한 기호에 가장 짧은 코드를 할당하여 평균 코드 길이를 낮니다.
손실 없는 각 압축 방법을 작동 원리에 따라 매칭하십시오.
난이도 2/5 · 140 코인 + 오늘 첫 완료 시 소액 보너스
세 가지 모두 손실 없는 방식입니다: 디코더가 바이트 단위로 원본을 재구성합니다.
Lossy methods
- Images (JPEG): fine detail and colour differences the eye barely notices are dropped.
- Sound (MP3, AAC): pitches we hear poorly are removed, along with quiet sounds masked by louder ones at the same moment.
- Video: spatial 空间 compression works within each frame, like JPEG, and temporal 时间 compression stores most frames as only the differences from the previous frame, since consecutive frames are nearly identical.
영상의 시간적 압축Temporal compression은 다음과 같이 작동합니다:
난이도 1/5 · 100 코인 + 오늘 첫 완료 시 소액 보너스
대부분의 화면이 프레임 간에 동일하기 때문에, 시간적 압축Temporal compression은 각 프레임이 이전 프레임과 어떻게 다른지를 저장합니다. (공간적 압축Spatial compression은 프레임 내부의 디테일을 처리합니다.)
Worked example: how each kind of file is compressed
- Text file: dictionary and Huffman coding turn repeated words and common characters into short codes. It must stay lossless, because one changed character changes the meaning.
- Bitmap image: RLE for runs of identical pixels in icons and diagrams; lossy JPEG for photographs; or reduce the colour depth or resolution, which is also lossy.
- Vector graphic: the drawing list is already small. Remove drawing objects that are not needed, store coordinates to fewer decimal places, or apply a lossless method such as ZIP to the file.
- Sound file: lossy MP3 or AAC removes what the ear cannot hear; lowering the sampling rate or resolution is also lossy; lossless formats keep every sample and shrink much less.
벡터 그래픽 파일을 작게 만드는 방법은 무엇입니까? 모두 선택하십시오.
난이도 2/5 · 140 코인 + 오늘 첫 완료 시 소액 보너스
벡터 파일은 픽셀이 아닌 도형 목록이기 때문에 색심도가 없습니다. 색심도는 비트맵bitmap에 해당합니다.
Why streaming must be lossy
- Raw HD video is gigabytes per minute, and a home connection carries a few megabits per second.
- Lossless compression on video achieves perhaps a factor of two, nowhere near enough, so the picture would keep stopping to buffer.
- Lossy compression achieves a factor of a hundred or more by discarding detail the viewer does not notice at normal speed. The reason names the bandwidth and the data rate, not just "it is smaller".
왜 실시간 영상 스트리밍은 손실 있는 압축lossy compression을 사용합니까?
난이도 1/5 · 100 코인 + 오늘 첫 완료 시 소액 보너스
원본 HD 영상은 분당 기바(GB) 단위이며, 실시간 스트리밍 시 끊김 없이 압축하려면 손실 있는 방식만으로 충분한 감축이 가능합니다.
Marks that slip away
- Lossless means the original is recovered exactly; lossy means it cannot be. "Lossy loses quality" misses the point that the data is gone for good.
- RLE can make a noisy file larger. Say where it works and where it does not.
- Video compression is spatial and temporal; temporal stores the differences between frames.
- A "justify" answer ties the method to the file's use: exactness for accounts and medical images, size for streaming and phone galleries.
You've got it
- compression saves storage and bandwidth; lossless recovers the original exactly, lossy removes data permanently
- lossless methods: RLE (a value and a count, good on runs, bad on noise), dictionary coding (repeated sequences to short indices), Huffman coding (short codes for common symbols)
- lossy methods drop what the eye or ear misses; video adds spatial within a frame and temporal between frames
- justify from the use: exact data means lossless, limited bandwidth for streaming means lossy