Intel Extensible Firmware Interface User Manual

Page 988

Advertising
background image

Extensible Firmware Interface Specification

H-24

12/01/02

Version 1.10

Returns:

number of bytes actually read

--*/
{
INT32 i;

for (i = 0; mSrc < mSrcUpperLimit && i < n; i++) {
*p++ = *mSrc++;
}
n = i;

p -= n;
mOrigSize += n;
while (--i >= 0) {
UPDATE_CRC(*p++);
}
return n;
}


STATIC
VOID
InitPutBits ()
{
mBitCount = UINT8_BIT;
mSubBitBuf = 0;
}

STATIC
VOID
CountLen (
IN INT32 i
)
/*++

Routine Description:

Count the number of each code length for a Huffman tree.

Arguments:

i - the top node

Returns: (VOID)

--*/
{
STATIC INT32 Depth = 0;

if (i < mN) {
mLenCnt[(Depth < 16) ? Depth : 16]++;
} else {
Depth++;
CountLen(mLeft [i]);
CountLen(mRight[i]);
Depth--;
}
}

Advertising