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