- Category:
- Windows Develop
- Tags:
-
[Text]
- File Size:
- 904byte
- Update:
- 2008-10-13
- Downloads:
- 0 Times
- Uploaded by:
Description: Compressed text file
background
Compression is an effective method to reduce data volume and has been widely used in various information systems. One way to compress text files is as follows:
Non-alphabetic characters in the original text file, copied directly to the compressed file;
The word in the original document (all of which is composed of letters), if it first appears, adds the word to a list of words and copies it into a compressed file. Otherwise the word is not copied to the compressed file, but instead copies the word in the list of words to the compressed file.
The starting position of the list of words is 1.
The definition of a word is the largest sequence of letters in the text. Capital letters and lowercase letters are different letters, that is, ABC and ABC are different words. Examples of the words are as follows:
X -ray consists of two words x and ray
Mary s includes two words, Mary and s
A c-dec consists of three words a and c and Dec
Write a program that enters a set of strings and outputs a compressed text.
The input
Enter a text that allows you to assume that no Numbers will appear in the input, not more than 80 characters per line, and that the size of the input text will not exceed 10M.
The output
Compressed text.
- [9] - Matlab 6.X-assisted image processing sou
File list (Check if you may need any files):