Data storage and compression
도입됨
15:06
컴퓨터가 이_Handle를 사용하는 이유
프로세서 내부에는数十억 개의 미세한 스위치가 있습니다. 각 스위치는 켜짐 또는 꺼짐 상태 중 하나일 뿐입니다. 이것이 컴퓨터가 물리적으로 가지는 모든 것입니다 — 삼, 일곱, … 같은 숫자는 존재하지 않습니다.
영어 내레이션 · 영어와 중국어 자막 전환 가능
이 수업의 내용
| English | 의미 |
|---|---|
| Data storage | |
| sound file | |
| Compression/kəmˈpreʃn/ | Representing data using fewer bits; lossless methods preserve all original data, while lossy methods discard some information. |
| bit/bɪt/ | A binary digit, taking the value zero or one. |
| nibble/ˈnɪbl/ | A group of four bits. |
| byte/baɪt/ | A group of eight bits, commonly used as a unit of data storage. |
| kibibyte/ˈkɪbɪbaɪt/ | 키비바이트 |
| binary/ˈbaɪnəri/ | A number system using base two, with the digits zero and one. |
| colour depth/ˈkʌlə depθ/ | The number of bits used to represent a pixel's colour, determining how many encoded colour values are available. |
| sample rate/ˈsæmpl reɪt/ | |
| sample resolution/ˈsæmpl ˌrezəˈluːʃn/ | |
| bpp | |
| Lossless/ˈlɒsləs/ | Describing compression from which the original data can be recovered exactly. |
| run-length encoding/rʌn leŋθ enˈkəʊdɪŋ/ | 러런 길이 인코딩 |
| run/rʌn/ | |
| Lossy/ˈlɒsi/ | Describing compression that discards some original information so it cannot be perfectly recovered. |
| resolution/ˌrezəˈluːʃn/ | Here, the pixel dimensions of a bitmap image, such as its width and height in pixels. |
| program files | |
| Hz | |
| characters/ˈkærɪktəz/ | A text unit such as a letter, digit, punctuation mark or other symbol. |
파일 압축하기
- 데이터 저장 용량은 각 단계마다 1024배 증가하는 단위로 측정됩니다.
- 이미지 또는 소리 파일의 크기를 계산할 수 있습니다.
- 압축을 통해 파일을 더 작게 만들 수 있습니다.
저장소 용량 측정
- 비트(bit) (0 또는 1 하나) · 니블(nibble) (4 비트) · 바이트(byte) (8 비트).
- 이후 각 단위는 이전 단위보다 1024배가 됩니다(왜냐하면 $1024 = 2^{10}$ 때문): 키비바이트(kibibyte, KiB) = 1024 바이트, 메비바이트(mebibyte, MiB) = 1024 KiB, 기비바이트(gibibyte, GiB) = 1024 MiB, 테비바이트(tebibyte, TiB) = 1024 GiB.
- 단위를 한 단계 높일 때는 항상 1024로 나누십시오(1000으로 나누면 안 됨).

컴퓨터는 모든 데이터를 이진수 — 긴 0과 1의 나열로 표현합니다.

How many bytes are in 1 kibibyte (KiB)?
난이도 2/5 · 140코인 + 오늘 첫 완료 시 작은 보너스 추가
1 KiB = 1024 bytes (each storage unit steps up by 1024 = 2^10).
Match each storage/compression idea to its meaning.
난이도 2/5 · 140코인 + 오늘 첫 완료 시 작은 보너스 추가
File size grows with detail; compression shrinks it, losslessly or lossily.
파일 크기 계산
- 이미지(비트) $=$ 너비 × 높이 × 색상 깊이.
- 음성(비트) $=$ 샘플링 주파수 × 샘플 해상도 × 초.
- 바이트당 8로 나누고, KiB당 1024로 나누며, MiB로는 다시 나눕니다.
- 예: $1024 \times 1024$을 16 bpp $= 16\,777\,216$ 비트로 변환 시 $= 2$ MiB.
An image is 100 × 100 pixels with a colour depth of 24 bits. What is its size in bits?
난이도 2/5 · 140코인 + 오늘 첫 완료 시 작은 보너스 추가
width × height × colour depth = 100 × 100 × 24 = 240 000 bits.
압축
- 무손실(lossless) 압축은 파일 크기를 줄이지만 영구적인 손실 없이 원본을 정확히 복원할 수 있습니다. Run-length encoding (RLE) 은 연속된 반복을 한 번만 저장합니다 (예:
WWWWWWWW→ "8 W"). - 유손실(lossy) 압축은 데이터를 영구적으로 삭제(해상도/샘플링 주파수 낮춤)하여 훨씬 더 작은 크기로 만듭니다.
- 텍스트 및 프로그램 파일에는 무손실(lossless) 을, 사진, 음악, 동영상에는 유손실(lossy) 을 사용하십시오.

Run-length encoding은 반복되는 연속을 한 번만 (개수, 값) 쌍으로 저장함: 8 W, 그 다음 4 R.

Run-length encoding shrinks repeats
Compression makes a file smaller. Run-length encoding replaces a run of identical values with one value plus a count — lossless, and best when the data has long runs.
Lossless compression:
난이도 1/5 · 100코인 + 오늘 첫 완료 시 작은 보너스 추가
Lossless keeps all the data (e.g. RLE); lossy permanently discards some.
Run-length encoding (RLE) compresses data by:
난이도 1/5 · 100코인 + 오늘 첫 완료 시 작은 보너스 추가
RLE replaces a run like WWWWWWWW with "8 W" — great when data has many repeats.
Lossy compression is most appropriate for:
난이도 1/5 · 100코인 + 오늘 첫 완료 시 작은 보너스 추가
Lossy suits media where a slight quality loss buys a much smaller file; exact data needs lossless.
이 카드는 새로 추가되어 번역이 준비될 때까지 영어로 표시됩니다.
Worked example: a sound file, then RLE
A 10-second sound is recorded at 8000 Hz 赫兹 with a sample resolution of 16 bits. Find its size in KiB. Then compress the line WWWWWWBBBW with run-length encoding.
- Multiply, then step up the units:
- RLE stores each run as a count and a value: 6W 3B 1W. Ten characters 字符 become three pairs, and nothing is lost, so this is lossless compression.

An image is 100 pixels wide and 50 pixels high, with a colour depth of 8 bits. What is its size in bytes?
난이도 2/5 · 140코인 + 오늘 첫 완료 시 작은 보너스 추가
$100 \times 50 \times 8 = 40\,000$ bits, and $40\,000 \div 8 = 5000$ bytes.
Which file must be compressed with a lossless method?
난이도 1/5 · 100코인 + 오늘 첫 완료 시 작은 보너스 추가
If even one bit of a program changes, it will not run correctly; photos, music and video can lose detail people do not notice.
이해했습니다
- 저장소 단위는 1024씩 증가함 (KiB, MiB, GiB, TiB)
- 이미지 크기 = 너비 × 높이 × 색상 깊이 (비트); 음성 = 주파수 × 해상도 × 초
- 무손실(lossless) = 정확한 복원 (RLE); 유손실(lossy) = 작아짐, 영구적 손실
- 무손실(lossless)은 텍스트/프로그램용; 유손실(lossy)은 사진/음악/동영상용
어떤 문제가 있었나요? 사이트 팀만 이 내용을 볼 수 있습니다.