2014年2月8日星期六

week2

the basic core codes have been designed in the middle of the second week, when coming to the lab in friday, the rest of the code wish to being complete.

The primary algorithm of Huffman code was able to run successful, however there are some difficulties in Decode part when Encode part have been designed during the half work day in friday,
the difficulty is the encoded signal is a sequence binary code, and refer to dictionary, each signal has it own different length sequence binary code, and those different length sequence binary code will combine to a final sequence binary code in order, the problem is how to distinguish the each signal code from the final sequence binary code, then refer to dictionary to Decoded.

The test of establish the dictionary:

This is part of the code of function: huffmandictionary

This is the code used to test the function:
1.  Generate symbols for 6 to 11 and assume a vector represent the times they may appear in the sequence need to be code.
2. Establish the dictionary

The dictionary has been established successfully:



Other values:



没有评论:

发表评论