Intel Extensible Firmware Interface Network Router User Manual


  Open as PDF
of 1084
 
Extensible Firmware Interface Specification
17-6 12/01/02 Version 1.10
Table 17-1. Block Header Fields (continued)
Field Name Length (bits) Description
Char&Len Set
Code Length
Array
Variable If Char&Len Set Code Length Array Size is 0, then this field is a 9-bit
value that represents the only Huffman code used.
If Char&Len Set Code Length Array Size is not 0, then this field is an
encoded form of a concatenation of code lengths in increasing order of
the symbols.
The concatenation of Code lengths are two-step encoded:
Step 1:
If a code length is not zero, then it is encoded as code length + 2;
If a code length is zero, then the number of consecutive zero lengths
starting from this code length is counted -- If the count is equal to or
less than 2, then the code 0 is used for each zero length; if the count
is greater than 2 and less than 19, then the code 1 followed by a 4-bit
value of count 3 is used for these consecutive zero lengths; if the
count is equal to 19, then it is treated as 1 + 18, and a code 0 and a
code 1 followed by a 4-bit value of 15 are used for these
consecutive zero lengths; if the count is greater than 19, then the code
2 followed by a 9-bit value of count 20 is used for these
consecutive zero lengths.
Step 2:
The second step encoding is a Huffman encoding of the codes
produced by first step. (While encoding codes 1 and 2, their
appended values are not encoded and preserved in the resulting text).
The code lengths of generated Huffman tree are just the contents of
the Extra Set Code Length Array.
Position Set
Code Length
Array Size
4 The number of code lengths in the Position Set Code Length Array.
The Position Set Code Length Array contains code lengths of Position
Set in increasing order of the symbols in the Position Set, and if all
symbols greater than a certain symbol have zero code length, the
Position Set Code Length Array terminates at the last nonzero code
length symbol. Since there are 14 symbols in the Position Set (see
3.3.2), the maximum Position Set Code Length Array Size is 14.
Position Set
Code Length
Array
Variable If Position Set Code Length Array Size is 0, then this field is a 5-bit
value that represents the only Huffman code used.
If Position Set Code Length Array Size is not 0, then this field is an
encoded form of a concatenation of code lengths in increasing order of
the symbols.
The concatenation of Code lengths are encoded as follows:
If a code length is less than 7, then it is encoded as a normal 3-bit
value;
If a code length is equal to or greater than 7, then it is encoded as a
series of 1s followed by a terminating 0. The number of 1s =
Code length 4. For example, code length 10 is encoded as
1111110; code length 7 is encoded as 1110.