1 /** @file 2 LZMA Decompress Library header file 3 4 Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR> 5 This program and the accompanying materials 6 are licensed and made available under the terms and conditions of the BSD License 7 which accompanies this distribution. The full text of the license may be found at 8 http://opensource.org/licenses/bsd-license.php 9 10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 13 **/ 14 15 #ifndef __LZMADECOMPRESS_H__ 16 #define __LZMADECOMPRESS_H__ 17 18 /** 19 The internal implementation of *_DECOMPRESS_PROTOCOL.GetInfo(). 20 21 @param Source The source buffer containing the compressed data. 22 @param SourceSize The size of source buffer 23 @param DestinationSize The size of destination buffer. 24 @param ScratchSize The size of scratch buffer. 25 26 @retval RETURN_SUCCESS - The size of destination buffer and the size of scratch buffer are successfully retrieved. 27 @retval RETURN_INVALID_PARAMETER - The source data is corrupted 28 **/ 29 RETURN_STATUS 30 EFIAPI 31 LzmaUefiDecompressGetInfo ( 32 IN CONST VOID *Source, 33 IN UINT32 SourceSize, 34 OUT UINT32 *DestinationSize, 35 OUT UINT32 *ScratchSize 36 ); 37 38 /** 39 Decompresses a Lzma compressed source buffer. 40 41 Extracts decompressed data to its original form. 42 If the compressed source data specified by Source is successfully decompressed 43 into Destination, then RETURN_SUCCESS is returned. If the compressed source data 44 specified by Source is not in a valid compressed data format, 45 then RETURN_INVALID_PARAMETER is returned. 46 47 @param Source The source buffer containing the compressed data. 48 @param SourceSize The size of source buffer. 49 @param Destination The destination buffer to store the decompressed data 50 @param Scratch A temporary scratch buffer that is used to perform the decompression. 51 This is an optional parameter that may be NULL if the 52 required scratch buffer size is 0. 53 54 @retval RETURN_SUCCESS Decompression completed successfully, and 55 the uncompressed buffer is returned in Destination. 56 @retval RETURN_INVALID_PARAMETER 57 The source buffer specified by Source is corrupted 58 (not in a valid compressed format). 59 **/ 60 RETURN_STATUS 61 EFIAPI 62 LzmaUefiDecompress ( 63 IN CONST VOID *Source, 64 IN UINTN SourceSize, 65 IN OUT VOID *Destination, 66 IN OUT VOID *Scratch 67 ); 68 69 #endif // __LZMADECOMPRESS_H__ 70 71