- #1
Villiers
- 7
- 0
- Homework Statement
- In a text document each letter could be stored as an ASCII code of 8 bits
In this document the word ‘because’ requires 56 bits of data (7 letters x 8 bits)
Instead, the word could be added to a dictionary and assigned the binary code 01 which is a reduction of 38 bits for each occurrence
A saving for 50 occurrences of the word:
- Relevant Equations
- 50 x 54 bits saving = 2,700 bits saved, or 338 bytes
Hi
I have the answer to the dictionary compression question- but can't understand the following in the notes:
Instead, the word could be added to a dictionary and assigned the binary code 01 which is a reduction of 38 bits for each occurrence - what does this mean?
This is the extract in full:
In compressing larger volumes, a document of 100 pages could contain the word ‘because’ 50 times, resulting in 2000 bits of data being required. Instead the word could be added to a dictionary and assigned the code 01 which is a reduction of 38 bits for each occurrence. There would still be a slight overhead in terms of the storage of the dictionary but this would only be a one-off entry per word.
I have the answer to the dictionary compression question- but can't understand the following in the notes:
Instead, the word could be added to a dictionary and assigned the binary code 01 which is a reduction of 38 bits for each occurrence - what does this mean?
This is the extract in full:
In compressing larger volumes, a document of 100 pages could contain the word ‘because’ 50 times, resulting in 2000 bits of data being required. Instead the word could be added to a dictionary and assigned the code 01 which is a reduction of 38 bits for each occurrence. There would still be a slight overhead in terms of the storage of the dictionary but this would only be a one-off entry per word.