X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdePkg%2FInclude%2FLibrary%2FUefiDecompressLib.h;h=de4e88864400e9841f6c2aa01e9a580ded83883d;hp=d08a6eb3a0138798378866ec5c1d032771e3466e;hb=f405c0674aef0fb8bff34acb0011c47f7cd38ea6;hpb=fb3df220f89e6eecaf1862b9241d8a1214eeda1c diff --git a/MdePkg/Include/Library/UefiDecompressLib.h b/MdePkg/Include/Library/UefiDecompressLib.h index d08a6eb3a0..de4e888644 100644 --- a/MdePkg/Include/Library/UefiDecompressLib.h +++ b/MdePkg/Include/Library/UefiDecompressLib.h @@ -1,16 +1,19 @@ /** @file - Return UEFI Decompress Protocol + Provides services to decompress a buffer using the UEFI Decompress algorithm. - Copyright (c) 2006, Intel Corporation - All rights reserved. This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php + The UEFI Decompress Library enables the decompression of objects that + were compressed using the UEFI compression scheme. The UEFI Decompress + Library is independent of environment and requires the caller to allocate + all required memory buffers. - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
+This program and the accompanying materials +are licensed and made available under the terms and conditions of the BSD License +which accompanies this distribution. The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php - Module Name: UefiDecompressLib.h +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -18,7 +21,9 @@ #define __UEFI_DECPOMPRESS_LIB_H__ /** - Retrieves the size of the uncompressed buffer and the size of the scratch buffer. + Given a compressed source buffer, this function retrieves the size of + the uncompressed buffer and the size of the scratch buffer required + to decompress the compressed source buffer. Retrieves the size of the uncompressed buffer and the temporary scratch buffer required to decompress the buffer specified by Source and SourceSize. @@ -40,15 +45,19 @@ @param SourceSize The size, in bytes, of the source buffer. @param DestinationSize A pointer to the size, in bytes, of the uncompressed buffer that will be generated when the compressed buffer specified - by Source and SourceSize is decompressed.. + by Source and SourceSize is decompressed. @param ScratchSize A pointer to the size, in bytes, of the scratch buffer that is required to decompress the compressed buffer specified by Source and SourceSize. - @retval RETURN_SUCCESS The size of destination buffer and the size of scratch - buffer are successull retrieved. - @retval RETURN_INVALID_PARAMETER The source data is corrupted - + @retval RETURN_SUCCESS The size of the uncompressed data was returned + in DestinationSize and the size of the scratch + buffer was returned in ScratchSize. + @retval RETURN_INVALID_PARAMETER + The size of the uncompressed data or the size of + the scratch buffer cannot be determined from + the compressed data specified by Source + and SourceSize. **/ RETURN_STATUS EFIAPI @@ -62,11 +71,12 @@ UefiDecompressGetInfo ( /** Decompresses a compressed source buffer. + Extracts decompressed data to its original form. This function is designed so that the decompression algorithm can be implemented without using any memory services. As a result, this function is not allowed to - call any memory allocation services in its implementation. It is the caller's r - esponsibility to allocate and free the Destination and Scratch buffers. - If the compressed source data specified by Source is sucessfully decompressed + call any memory allocation services in its implementation. It is the caller's + responsibility to allocate and free the Destination and Scratch buffers. + If the compressed source data specified by Source is successfully decompressed into Destination, then RETURN_SUCCESS is returned. If the compressed source data specified by Source is not in a valid compressed data format, then RETURN_INVALID_PARAMETER is returned. @@ -81,16 +91,18 @@ UefiDecompressGetInfo ( This is an optional parameter that may be NULL if the required scratch buffer size is 0. - @retval RETURN_SUCCESS Decompression is successfull - @retval RETURN_INVALID_PARAMETER The source data is corrupted - + @retval RETURN_SUCCESS Decompression completed successfully, and + the uncompressed buffer is returned in Destination. + @retval RETURN_INVALID_PARAMETER + The source buffer specified by Source is corrupted + (not in a valid compressed format). **/ RETURN_STATUS EFIAPI UefiDecompress ( IN CONST VOID *Source, IN OUT VOID *Destination, - IN OUT VOID *Scratch + IN OUT VOID *Scratch OPTIONAL ); #endif