Computer Science - 9210 OxfordAQA

Data Compression

Gbogbo ọrọ náà

Write out the word BANANA in ordinary character codes and it takes 42 bits. Write it out cleverly and it takes 9. Nothing has been thrown away, nothing has been approximated, and the original word can be reconstructed exactly. The saving comes from noticing something the plain encoding ignores: the letter A turns up three times as often as the letter B, and a code that gives A a shorter pattern than B will win.

This lesson covers what data compression is, why it is worth doing, and the two methods this specification examines. You will learn to write data as run length encoding pairs, to build a Huffman tree from a string and read the codes off it, to interpret a tree somebody else has given you, and to calculate exactly how many bits each method saves against plain 7-bit ASCII. You will also learn the situation in which compression makes a file larger, which is a real result and a favourite of examiners.

Ebumnobi

  1. Explain what data compression is.
  2. Understand why data may be compressed and that there are different ways to compress data. Explain how data can be compressed using Huffman coding. Be able to build a Huffman tree.
  3. Be able to interpret a Huffman tree.
  4. Calculate the number of bits required to store a piece of data compressed using Huffman coding.
  5. Calculate the number of bits required to store a piece of uncompressed data in ASCII.
  6. Explain how data can be compressed using run length encoding (RLE).
  7. Represent data in RLE frequency/data pairs.

Maapụ uche

E seela isiokwu a ka ị hụ otu echiche si ejikọta.

Mepee maapụ uche na ngwa

Akwụkwọ Ọmụmụ

Data compression is the process of encoding data so that it uses fewer bits than it did before, while still representing the same information. The word same is doing real work in that sentence: the methods on this specification are both able to reproduce the original data exactly, so nothing is approximated or discarded. Compressing and then decompressing gets you back precisely what you started with.

Ndetu Nkuzi Zuru Ezu di na Ngwa Green Bridge

Nweta ngwa Green Bridge CBT na ekwenti gi ma o bu kompiuta maka ulo akwukwo IGCSE zuru oke: akwukwo ule ndi gara aga, usoro nyocha, eserese uche, kaadi omumu na nkuzi olu.

Akwụkwọ ndụmọdụ zuru oke nwere eserese
Onye inyeaka mmụta AI
Ule nnwale nwere oge a na-ahazi ozugbo i mechara
Ọ dị na Android, Windows, macOS, na Linux Ngwa iOS na-abia n'oge na-adighi anya

Nnyocha Ọmụmụ

Ekele diri gi maka imecha ihe karịrị na Data Compression. Ugbu a na ị na-enyochakwa isi echiche na echiche ndị dị mkpa, ọ bụ oge iji nwalee ihe ị ma. Ngwa a na-enye ụdị ajụjụ ọmụmụ dị iche iche emebere iji kwado nghọta gị wee nyere gị aka ịmata otú ị ghọtara ihe ndị a kụziri.

Ị ga-ahụ ngwakọta nke ụdị ajụjụ dị iche iche, gụnyere ajụjụ chọrọ ịhọrọ otu n’ime ọtụtụ azịza, ajụjụ chọrọ mkpirisi azịza, na ajụjụ ede ede. A na-arụpụta ajụjụ ọ bụla nke ọma iji nwalee akụkụ dị iche iche nke ihe ọmụma gị na nkà nke ịtụgharị uche.

Jiri akụkụ a nke nyocha ka ohere iji kụziere ihe ị matara banyere isiokwu ahụ ma chọpụta ebe ọ bụla ị nwere ike ịchọ ọmụmụ ihe ọzọ. Ekwela ka nsogbu ọ bụla ị na-eche ihu mee ka ị daa mba; kama, lee ha anya dị ka ohere maka ịzụlite onwe gị na imeziwanye.

  1. What is data compression? A. Encoding data so it uses fewer bits while representing the same information B. Deleting parts of a file that are not needed C. Converting a file from binary into hexadecimal D. Copying a file to a second storage device Answer: A
  2. Using run length encoding with frequency first, how is the binary data 00011000 represented? A. 3 0 2 1 3 0 B. 0 3 1 2 0 3 C. 3 2 3 D. 8 0 Answer: A
  3. Why does run length encoding work poorly on a file of English text? A. Text files are always too large to compress B. Consecutive characters are usually different, so runs are very short C. Text is stored in Unicode rather than in binary D. Run length encoding can only be used on numbers Answer: B
  4. In a Huffman tree, which characters end up with the shortest codes? A. The ones that occur least often B. The ones that occur most often C. The ones that come first alphabetically D. All characters get codes of equal length Answer: B
  5. A message of 20 characters is stored in 7-bit ASCII. How many bits does it need uncompressed? A. 27 B. 60 C. 140 D. 160 Answer: C

Rue ajuju ndi a n'ime ngwa ahu

Rue ajuju ndi a n'ime ngwa ahu

Meecha Ajụjụ Ule Ọmarịcha

Ị chọrọ ime ajụjụ ule ọmarịcha gbasara Data Compression? Budata ngwa Green Bridge CBT iji nweta ajụjụ ule ọmarịcha na nyocha zuru ezu gbasara isiokwu a.

Budata Ngwa Ahụ Na Google Playstore

Ihe nile ichoro iji nwee ihe ịga nke ọma na JAMB, WAEC & NECO.

Green Bridge CBT Mobile App
Onye Enyemaka Nkata AI Nke Ọmụmụ Ihe Ahaziri Maka Gị
Ajụjụ ule IGCSE, JAMB, WAEC na NECO karịrị 200,000
Ihe karịrị 1200 Nkọwa Nkuzi
Nkwado Na-enweghị Ịntanetị - Mụọ Ihe Mgbe Ọ Bụla, Ebe Ọ Bụla
Jadawalin Gada Kore
Akọkọ akọle iwe & Ibeere agbara
Sọfụma Ọrụ Gi & Ọganihu Gi
Nkọwa Miri Emi Maka Ọmụmụ Ihe Zuru Ezu