]>
Commit | Line | Data |
---|---|---|
878ddf1f | 1 | /** @file\r |
24e25d11 | 2 | Return UEFI Decompress Protocol \r |
878ddf1f | 3 | \r |
24e25d11 | 4 | Copyright (c) 2006, Intel Corporation \r |
5 | All rights reserved. This program and the accompanying materials \r | |
6 | are licensed and made available under the terms and conditions of the BSD License \r | |
7 | which accompanies this distribution. The full text of the license may be found at \r | |
8 | http://opensource.org/licenses/bsd-license.php \r | |
878ddf1f | 9 | \r |
24e25d11 | 10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r | |
878ddf1f | 12 | \r |
24e25d11 | 13 | Module Name: UefiDecompressLib.h\r |
878ddf1f | 14 | \r |
15 | **/\r | |
16 | \r | |
17 | #ifndef __UEFI_DECPOMPRESS_LIB_H__\r | |
18 | #define __UEFI_DECPOMPRESS_LIB_H__\r | |
19 | \r | |
1ea5ca46 | 20 | /**\r |
21 | Retrieves the size of the uncompressed buffer and the size of the scratch buffer.\r | |
22 | \r | |
23 | Retrieves the size of the uncompressed buffer and the temporary scratch buffer \r | |
24 | required to decompress the buffer specified by Source and SourceSize.\r | |
25 | If the size of the uncompressed buffer or the size of the scratch buffer cannot\r | |
26 | be determined from the compressed data specified by Source and SourceData, \r | |
27 | then RETURN_INVALID_PARAMETER is returned. Otherwise, the size of the uncompressed\r | |
28 | buffer is returned in DestinationSize, the size of the scratch buffer is returned\r | |
29 | in ScratchSize, and RETURN_SUCCESS is returned.\r | |
30 | This function does not have scratch buffer available to perform a thorough \r | |
31 | checking of the validity of the source data. It just retrieves the "Original Size"\r | |
32 | field from the beginning bytes of the source data and output it as DestinationSize.\r | |
33 | And ScratchSize is specific to the decompression implementation.\r | |
34 | \r | |
35 | If Source is NULL, then ASSERT().\r | |
36 | If DestinationSize is NULL, then ASSERT().\r | |
37 | If ScratchSize is NULL, then ASSERT().\r | |
38 | \r | |
39 | @param Source The source buffer containing the compressed data.\r | |
40 | @param SourceSize The size, in bytes, of the source buffer.\r | |
41 | @param DestinationSize A pointer to the size, in bytes, of the uncompressed buffer\r | |
42 | that will be generated when the compressed buffer specified\r | |
43 | by Source and SourceSize is decompressed..\r | |
44 | @param ScratchSize A pointer to the size, in bytes, of the scratch buffer that\r | |
45 | is required to decompress the compressed buffer specified \r | |
46 | by Source and SourceSize.\r | |
47 | \r | |
48 | @retval RETURN_SUCCESS The size of destination buffer and the size of scratch \r | |
49 | buffer are successull retrieved.\r | |
50 | @retval RETURN_INVALID_PARAMETER The source data is corrupted\r | |
51 | \r | |
52 | **/\r | |
878ddf1f | 53 | RETURN_STATUS\r |
54 | EFIAPI\r | |
55 | UefiDecompressGetInfo (\r | |
56 | IN CONST VOID *Source,\r | |
57 | IN UINT32 SourceSize,\r | |
58 | OUT UINT32 *DestinationSize,\r | |
59 | OUT UINT32 *ScratchSize\r | |
60 | );\r | |
61 | \r | |
1ea5ca46 | 62 | /**\r |
63 | Decompresses a compressed source buffer.\r | |
64 | \r | |
65 | This function is designed so that the decompression algorithm can be implemented\r | |
66 | without using any memory services. As a result, this function is not allowed to\r | |
67 | Content-type: text/html ]>