+ );\r
+\r
+\r
+/**\r
+ Given a compressed source buffer, this function retrieves the size of the\r
+ uncompressed buffer and the size of the scratch buffer required to decompress\r
+ the compressed source buffer.\r
+\r
+ The GetInfo() function retrieves the size of the uncompressed buffer and the\r
+ temporary scratch buffer required to decompress the buffer specified by Source\r
+ and SourceSize. If the size of the uncompressed buffer or the size of the\r
+ scratch buffer cannot be determined from the compressed data specified by\r
+ Source and SourceData, then EFI_INVALID_PARAMETER is returned. Otherwise, the\r
+ size of the uncompressed buffer is returned in DestinationSize, the size of\r
+ the scratch buffer is returned in ScratchSize, and EFI_SUCCESS is returned.\r
+ The GetInfo() function does not have scratch buffer available to perform a\r
+ thorough checking of the validity of the source data. It just retrieves the\r
+ "Original Size" field from the beginning bytes of the source data and output\r
+ it as DestinationSize. And ScratchSize is specific to the decompression\r
+ implementation.\r
+\r
+ @param This A pointer to the EFI_DECOMPRESS_PROTOCOL instance.\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\r
+ uncompressed buffer that will be generated when the\r
+ compressed buffer specified by Source and\r
+ SourceSize is decompressed.\r
+ @param ScratchSize A pointer to the size, in bytes, of the scratch\r
+ buffer that is required to decompress the\r
+ compressed buffer specified by Source and\r
+ SourceSize.\r
+\r
+ @retval EFI_SUCCESS The size of the uncompressed data was returned in\r
+ DestinationSize and the size of the scratch buffer\r
+ was returned in ScratchSize.\r
+ @retval EFI_INVALID_PARAMETER The size of the uncompressed data or the size of\r
+ the scratch buffer cannot be determined from the\r
+ compressed data specified by Source and\r
+ SourceSize.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+DxeMainUefiDecompressGetInfo (\r
+ IN EFI_DECOMPRESS_PROTOCOL *This,\r
+ IN VOID *Source,\r
+ IN UINT32 SourceSize,\r
+ OUT UINT32 *DestinationSize,\r
+ OUT UINT32 *ScratchSize\r
+ );\r
+\r
+\r
+/**\r
+ Decompresses a compressed source buffer.\r
+\r
+ The Decompress() function extracts decompressed data to its original form.\r
+ This protocol is designed so that the decompression algorithm can be\r
+ implemented without using any memory services. As a result, the Decompress()\r
+ Function is not allowed to call AllocatePool() or AllocatePages() in its\r
+ implementation. It is the caller's responsibility to allocate and free the\r
+ Destination and Scratch buffers.\r
+ If the compressed source data specified by Source and SourceSize is\r
+ sucessfully decompressed into Destination, then EFI_SUCCESS is returned. If\r
+ the compressed source data specified by Source and SourceSize is not in a\r
+ valid compressed data format, then EFI_INVALID_PARAMETER is returned.\r
+\r
+ @param This A pointer to the EFI_DECOMPRESS_PROTOCOL instance.\r
+ @param Source The source buffer containing the compressed data.\r
+ @param SourceSize SourceSizeThe size of source data.\r
+ @param Destination On output, the destination buffer that contains\r
+ the uncompressed data.\r
+ @param DestinationSize The size of the destination buffer. The size of\r
+ the destination buffer needed is obtained from\r
+ EFI_DECOMPRESS_PROTOCOL.GetInfo().\r
+ @param Scratch A temporary scratch buffer that is used to perform\r
+ the decompression.\r
+ @param ScratchSize The size of scratch buffer. The size of the\r
+ scratch buffer needed is obtained from GetInfo().\r
+\r
+ @retval EFI_SUCCESS Decompression completed successfully, and the\r
+ uncompressed buffer is returned in Destination.\r
+ @retval EFI_INVALID_PARAMETER The source buffer specified by Source and\r
+ SourceSize is corrupted (not in a valid\r
+ compressed format).\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+DxeMainUefiDecompress (\r
+ IN EFI_DECOMPRESS_PROTOCOL *This,\r
+ IN VOID *Source,\r
+ IN UINT32 SourceSize,\r
+ IN OUT VOID *Destination,\r
+ IN UINT32 DestinationSize,\r
+ IN OUT VOID *Scratch,\r
+ IN UINT32 ScratchSize\r
+ );\r
+\r
+/**\r
+ SEP member function. This function creates and returns a new section stream\r
+ handle to represent the new section stream.\r
+\r
+ @param SectionStreamLength Size in bytes of the section stream.\r
+ @param SectionStream Buffer containing the new section stream.\r
+ @param SectionStreamHandle A pointer to a caller allocated UINTN that on\r
+ output contains the new section stream handle.\r
+\r
+ @retval EFI_SUCCESS The section stream is created successfully.\r
+ @retval EFI_OUT_OF_RESOURCES memory allocation failed.\r
+ @retval EFI_INVALID_PARAMETER Section stream does not end concident with end\r
+ of last section.\r