Assume that the dictionary itself can be stored by using


Write a program to construct a dictionary of all "words," defined to be runs of consecutive non whitespace, in a given text file. We might then compress the file (ignoring the loss of whitespace information) by representing each word as an index in the dictionary. Retrieve the file rfc791.txt containing [Pos81], and run your program on it. Give the size of the compressed file assuming first that each word is encoded with 12 bits (this should be sufficient), and then that the 128 most common words are encoded with 8 bits and the rest with 13 bits. Assume that the dictionary itself can be stored by using, for each word, length(word) + 1 bytes.

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Assume that the dictionary itself can be stored by using
Reference No:- TGS01395003

Expected delivery within 24 Hours