In: Computer Science
a) Discuss two basic forms of compression. Given the following data string, present the result using run-length encoding. By what percentage is the data compressed? 0000011000000001000000000100001100000000 [5 Marks]
b) Sam wants to send 2000 8-bit characters of data. Find the total number of bits he will transmit using asynchronous transmission. Now, if he decides to use the synchronous connection, how many bits will be transferred if 1000 characters fit within one synchronous transmission frame?
Please find the attached answer below.
Ans a) The two basic forms of compression are defined on the basis of amount of data loss when the data is compressed. The two basic forms of compression are : Lossy and Lossless compression.
1.LOSSY COMPRESSION: Lossy compression reduces the size of the file by eliminating or removing some part of the data.This can be done by different means in different types of files.For example in an image the image can be coverted to grey scale for lossy compression.This type of compression is called lossy as most of the time this result in loss of quality of the file. The conversion of an MP4 file to MP3 is an example of lossy conversion.This type of compression result in saving of more space where the compressed file is stored because some part of the original files is discarded during compression.
2. LOSSLESS COMPRESSION: Lossless compression does not result into reduction of the size of the file or data which is compressed. No data is discarded in this type of compression and thus the original file can be retraced after decompression without any data loss.Some example of lossless compression of the files are .zip .rar etc. In these file compression the file is compressed using some algorithm and then file can again be decompressed to obtain the original file.This type of compression doest not result in saving of space as much as in the case of lossy compression.
For the run length encoding and compression ratio of the given data , PLEASE FIND THE ATTACHED IMAGE BELOW -->