/* If SourceSize is less than LZMA_HEADER_SIZE, then ASSERT(). */
RETURN_STATUS EFIAPI LzmaUefiDecompressGetInfo(IN CONST VOID *Source, IN UINT32 SourceSize, OUT UINT32 *DestinationSize, OUT UINT32 *ScratchSize)
/* If SourceSize is less than LZMA_HEADER_SIZE, then ASSERT(). */
RETURN_STATUS EFIAPI LzmaUefiDecompressGetInfo(IN CONST VOID *Source, IN UINT32 SourceSize, OUT UINT32 *DestinationSize, OUT UINT32 *ScratchSize)
{
  UInt64  DecodedSize;
  ASSERT (SourceSize >= LZMA_HEADER_SIZE);
  DecodedSize = GetDecodedSizeOfBuf ((UINT8 *)Source);
  if (DecodedSize > MAX_UINT32) {
    return RETURN_UNSUPPORTED;
  }
  *DestinationSize = (UINT32)DecodedSize;
  *ScratchSize     = SCRATCH_BUFFER_REQUEST_SIZE;
  return RETURN_SUCCESS;
}