/* If SourceSize is less than BROTLI_SCRATCH_MAX, then ASSERT(). */
EFI_STATUS EFIAPI BrotliUefiDecompressGetInfo(IN CONST VOID *Source, IN UINT32 SourceSize, OUT UINT32 *DestinationSize, OUT UINT32 *ScratchSize)
/* If SourceSize is less than BROTLI_SCRATCH_MAX, then ASSERT(). */
EFI_STATUS EFIAPI BrotliUefiDecompressGetInfo(IN CONST VOID *Source, IN UINT32 SourceSize, OUT UINT32 *DestinationSize, OUT UINT32 *ScratchSize)
{
  UINT64  GetSize;
  UINT8   MaxOffset;
  ASSERT (SourceSize >= BROTLI_SCRATCH_MAX);
  MaxOffset        = BROTLI_DECODE_MAX;
  GetSize          = BrGetDecodedSizeOfBuf ((UINT8 *)Source, MaxOffset - BROTLI_INFO_SIZE, MaxOffset);
  *DestinationSize = (UINT32)GetSize;
  MaxOffset        = BROTLI_SCRATCH_MAX;
  GetSize          = BrGetDecodedSizeOfBuf ((UINT8 *)Source, MaxOffset - BROTLI_INFO_SIZE, MaxOffset);
  *ScratchSize     = (UINT32)GetSize;
  return EFI_SUCCESS;
}