+ 1
File compression
"the program should be able to compress a file into a list of words and list of positions to recreate original file. it should be able to take a compressed file and recreate the full text of the original file."
2 Respostas
+ 16
This is called "lossless compression". The file can be compressed and then uncompressed without any data from the original file being lost... as opposed to "lossy compression" where each time, some amount of data is lost (like YouTube video compression).
The compression algorithm itself should be able to search for repeating patterns like "And" and storing the patterns along with indexes of where to find these patterns. Then, when the file is being uncompressed, it goes through each pattern and puts them back where they belong.
As a simple example, take this:
"jjjhhhhhwwww"
you can compress it to:
"j3h5w4"
That's all the information you need.
+ 3
So you want us to do that? Nope