Extensible Firmware Interface Specification
H-18 12/01/02 Version 1.10
Arguments:
n - the number of symbols
nbit - the number of bits needed to represent ’n’
Special - the special symbol that needs to be take care of
Returns: (VOID)
--*/
{
INT32 i, k;
while (n > 0 && mPTLen[n - 1] == 0) {
n--;
}
PutBits(nbit, n);
i = 0;
while (i < n) {
k = mPTLen[i++];
if (k <= 6) {
PutBits(3, k);
} else {
PutBits(k - 3, (1U << (k - 3)) - 2);
}
if (i == Special) {
while (i < 6 && mPTLen[i] == 0) {
i++;
}
PutBits(2, (i - 3) & 3);
}
}
}
STATIC
VOID
WriteCLen ()
/*++
Routine Description:
Outputs the code length array for Char&Length Set
Arguments: (VOID)
Returns: (VOID)
--*/
{
INT32 i, k, n, Count;
n = NC;
while (n > 0 && mCLen[n - 1] == 0) {
n--;
}
PutBits(CBIT, n);
i = 0;
while (i < n) {
k = mCLen[i++];
if (k == 0) {
Count = 1;