Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private byte Generate(HuffmanTable h)
- {
- int i = 0;
- byte codevalue = 0;
- int[] codelength = new int[16] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 };
- for (int k = 0; k < 16; k++)
- {
- for (int j = 0; j < h.NumberOfCodeword[k]; j++)
- {
- h.Category[i] = codevalue;
- codelength[i] = k;
- codevalue++;
- i++;
- }
- codevalue *= 2;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment