/* Get the size of the uncompressed buffer by parsing EncodeData header. */
UINT64 BrGetDecodedSizeOfBuf(IN UINT8 *EncodedData, IN UINT8 StartOffset, IN UINT8 EndOffset)
/* Get the size of the uncompressed buffer by parsing EncodeData header. */
UINT64 BrGetDecodedSizeOfBuf(IN UINT8 *EncodedData, IN UINT8 StartOffset, IN UINT8 EndOffset)
{
  UINT64  DecodedSize;
  INTN    Index;
  DecodedSize = 0;
  for (Index = EndOffset - 1; Index >= StartOffset; Index--) {
    DecodedSize = LShiftU64 (DecodedSize, 8) + EncodedData[Index];
  }
  return DecodedSize;
}