+++ /dev/null
-/** @file\r
- LZMA Decompress Library internal header file declares Lzma decompress interfaces.\r
-\r
- Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
- SPDX-License-Identifier: BSD-2-Clause-Patent\r
-\r
-**/\r
-\r
-#ifndef __LZMADECOMPRESSLIB_INTERNAL_H__\r
-#define __LZMADECOMPRESSLIB_INTERNAL_H__\r
-\r
-#include <PiPei.h>\r
-#include <Library/BaseLib.h>\r
-#include <Library/BaseMemoryLib.h>\r
-#include <Library/DebugLib.h>\r
-#include <Library/ExtractGuidedSectionLib.h>\r
-#include <Guid/LzmaDecompress.h>\r
-\r
-/**\r
- Given a Lzma compressed source buffer, this function retrieves the size of\r
- the uncompressed buffer and the size of the scratch buffer required\r
- to decompress the compressed source buffer.\r
-\r
- Retrieves the size of the uncompressed buffer and the temporary scratch buffer\r
- required to decompress the buffer specified by Source and SourceSize.\r
- The size of the uncompressed buffer is returned in DestinationSize,\r
- the size of the scratch buffer is returned in ScratchSize, and RETURN_SUCCESS is returned.\r
- This function does not have scratch buffer available to perform a thorough\r
- checking of the validity of the source data. It just retrieves the "Original Size"\r
- field from the LZMA_HEADER_SIZE beginning bytes of the source data and output it as DestinationSize.\r
- And ScratchSize is specific to the decompression implementation.\r
-\r
- If SourceSize is less than LZMA_HEADER_SIZE, then ASSERT().\r
-\r
- @param Source The source buffer containing the compressed data.\r
- @param SourceSize The size, in bytes, of the source buffer.\r
- @param DestinationSize A pointer to the size, in bytes, of the uncompressed buffer\r
- that will be generated when the compressed buffer specified\r
- by Source and SourceSize is decompressed.\r
- @param ScratchSize A pointer to the size, in bytes, of the scratch buffer that\r
- is required to decompress the compressed buffer specified\r
- by Source and SourceSize.\r
-\r
- @retval RETURN_SUCCESS The size of the uncompressed data was returned\r
- in DestinationSize and the size of the scratch\r
- buffer was returned in ScratchSize.\r
-\r
-**/\r
-RETURN_STATUS\r
-EFIAPI\r
-LzmaUefiDecompressGetInfo (\r
- IN CONST VOID *Source,\r
- IN UINT32 SourceSize,\r
- OUT UINT32 *DestinationSize,\r
- OUT UINT32 *ScratchSize\r
- );\r
-\r
-/**\r
- Decompresses a Lzma compressed source buffer.\r
-\r
- Extracts decompressed data to its original form.\r
- If the compressed source data specified by Source is successfully decompressed\r
- into Destination, then RETURN_SUCCESS is returned. If the compressed source data\r
- specified by Source is not in a valid compressed data format,\r
- then RETURN_INVALID_PARAMETER is returned.\r
-\r
- @param Source The source buffer containing the compressed data.\r
- @param SourceSize The size of source buffer.\r
- @param Destination The destination buffer to store the decompressed data\r
- @param Scratch A temporary scratch buffer that is used to perform the decompression.\r
- This is an optional parameter that may be NULL if the\r
- required scratch buffer size is 0.\r
-\r
- @retval RETURN_SUCCESS Decompression completed successfully, and\r
- the uncompressed buffer is returned in Destination.\r
- @retval RETURN_INVALID_PARAMETER\r
- The source buffer specified by Source is corrupted\r
- (not in a valid compressed format).\r
-**/\r
-RETURN_STATUS\r
-EFIAPI\r
-LzmaUefiDecompress (\r
- IN CONST VOID *Source,\r
- IN UINTN SourceSize,\r
- IN OUT VOID *Destination,\r
- IN OUT VOID *Scratch\r
- );\r
-\r
-#endif\r
-\r