The previous article introduced the Mobi file format compression principle, this article tests the decompression effect.
In order to confirm our English text This compression principle, we chose the Big "Collins Dictionary (English version)" Mobi file. Compressed file 10 trillion, using the example of the program, randomly from the file $20000 address to intercept a small segment (random) run the program, the effect is as follows:
1. In the picture, the first place is garbled (in line with what we see: There is no index before, so copy).
2. Once a text output is available, the program restores the original text based on the encoding.
3. Change the address, we can get different content. (Legato notation also restores normal).
4. Because the algorithm is simple and fast, it can decode in real time.
5. Similarly, we can also write our own compression program according to this compression principle.
Mobi format File Decompression Practice