Reprint Annotated Source: Http://blog.csdn.net/wang_zheng_kai
Let students use development tools, practice learning data compression coding
Tianjin University of Technology, School of letters and electricity
This article consists of two parts:
Using C to implement arithmetic coding on Linux (a)--concrete operation
Using C to implement arithmetic coding on Linux (ii)--specific code
ubuntu14.04 arithmetic coding with C language (fixed)
1, open the ubuntu14.04 system, the interface is as follows:
2, press ctrl+alt+t, open terminal, execute command LS View the code of the arithmetic code FIXED_ARITHMETIC.C
3. Execute the following command to compile the code.
4, Generate executable program fixed_arithmetic.
5. Run the program according to the following command.
6. Enter the number of signal source symbols.
7. Enter the source symbol in turn and its corresponding probability
8. Enter the message queue to compile and end the input with ' * '.
9, enter, display the compilation and decoding results.
Using C to implement arithmetic coding on Linux (a)--concrete operation