Run Length Encoding It is sometimes important to minimise the space used for storing data. This idea...
80.2K
Verified Solution
Question
Programming
Run Length Encoding
It is sometimes important to minimise the space used for storingdata. This idea of data compression can be implemented in manyforms. One of the simpler techniques is known as Run LengthEncoding (RLE). RLE takes advantage of the fact that in many cases,data will contain a run of repeated 0s or 1s, and these runs can berepresented by a shorter code. RLE is a technique used in someimage or sound formats to reduce the overall size of the file.There are many variations of this process, but for this assignment,you will use the 3-bit encoding version described below.
- Given binary data represented by a sequence of 0s and 1s, breakthe number into runs of 0s and 1s and note the length of eachrun.
- For any run of more than 7, break the run into groups of 7 orsmaller.
- For each run, create an encoded form by first placing the typeof run 0 or 1 and then the binary representation of the run’slength.
- Write out the encoded form of data by taking each encoded runand separating them with spaces. Be sure to keep the original orderof the data intact.
Example:
Given 11111000000010000001111111000000, what is the RLE form ofthis data?
Breaking this into runs gives us 5 1s, 7 0s, 1 1s, 6 0s, 7 1s, 60s
For each group, combine the type of run followed by the lengthin binary. Use spaces to separate each run:
1101 0111 1001 0110 1111 0110 is the RLE form.
Data Compression
Data compression is the ratio of the compressed data over theuncompressed data. In this case, the compressed data is 24 bits(including the spaces, which must be counted), and the originaldata is 32 bits. This gives a data compression ratio of 0.75.
Question 1a: What is the RLE of thefollowing?
1111100000000000
Question 1b:
What is the compression ratio for the answer to Question 1a?
Question 2a: What is the RLE of thefollowing?
101010
Question 2b:
What is the compression ratio for the answer to Question 2a?
Could you please help with these questions with enoughexplanation?
Thanks a lot
Run Length Encoding
It is sometimes important to minimise the space used for storingdata. This idea of data compression can be implemented in manyforms. One of the simpler techniques is known as Run LengthEncoding (RLE). RLE takes advantage of the fact that in many cases,data will contain a run of repeated 0s or 1s, and these runs can berepresented by a shorter code. RLE is a technique used in someimage or sound formats to reduce the overall size of the file.There are many variations of this process, but for this assignment,you will use the 3-bit encoding version described below.
- Given binary data represented by a sequence of 0s and 1s, breakthe number into runs of 0s and 1s and note the length of eachrun.
- For any run of more than 7, break the run into groups of 7 orsmaller.
- For each run, create an encoded form by first placing the typeof run 0 or 1 and then the binary representation of the run’slength.
- Write out the encoded form of data by taking each encoded runand separating them with spaces. Be sure to keep the original orderof the data intact.
Example:
Given 11111000000010000001111111000000, what is the RLE form ofthis data?
Breaking this into runs gives us 5 1s, 7 0s, 1 1s, 6 0s, 7 1s, 60s
For each group, combine the type of run followed by the lengthin binary. Use spaces to separate each run:
1101 0111 1001 0110 1111 0110 is the RLE form.
Data Compression
Data compression is the ratio of the compressed data over theuncompressed data. In this case, the compressed data is 24 bits(including the spaces, which must be counted), and the originaldata is 32 bits. This gives a data compression ratio of 0.75.
Question 1a: What is the RLE of thefollowing?
1111100000000000
Question 1b:
What is the compression ratio for the answer to Question 1a?
Question 2a: What is the RLE of thefollowing?
101010
Question 2b:
What is the compression ratio for the answer to Question 2a?
Could you please help with these questions with enoughexplanation?
Thanks a lot
Answer & Explanation Solved by verified expert
Get Answers to Unlimited Questions
Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!
Membership Benefits:
- Unlimited Question Access with detailed Answers
- Zin AI - 3 Million Words
- 10 Dall-E 3 Images
- 20 Plot Generations
- Conversation with Dialogue Memory
- No Ads, Ever!
- Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Other questions asked by students
StudyZin's Question Purchase
1 Answer
$0.99
(Save $1 )
One time Pay
- No Ads
- Answer to 1 Question
- Get free Zin AI - 50 Thousand Words per Month
Unlimited
$4.99*
(Save $5 )
Billed Monthly
- No Ads
- Answers to Unlimited Questions
- Get free Zin AI - 3 Million Words per Month
*First month only
Free
$0
- Get this answer for free!
- Sign up now to unlock the answer instantly
You can see the logs in the Dashboard.