]> git.proxmox.com Git - mirror_edk2.git/blame - BaseTools/Source/C/Common/Decompress.h
Sync EDKII BaseTools to BaseTools project r1971
[mirror_edk2.git] / BaseTools / Source / C / Common / Decompress.h
CommitLineData
30fdf114
LG
1/** @file\r
2\r
40d841f6
LG
3Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
4This program and the accompanying materials \r
30fdf114
LG
5are licensed and made available under the terms and conditions of the BSD License \r
6which accompanies this distribution. The full text of the license may be found at \r
7http://opensource.org/licenses/bsd-license.php \r
8 \r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
11\r
12Module Name:\r
13 \r
14 Decompress.h\r
15\r
16Abstract:\r
17\r
18 Header file for compression routine\r
19 \r
20**/\r
21\r
22#ifndef _EFI_DECOMPRESS_H\r
23#define _EFI_DECOMPRESS_H\r
24\r
25#include <Common/UefiBaseTypes.h>\r
26\r
27EFI_STATUS\r
28EfiGetInfo (\r
29 IN VOID *Source,\r
30 IN UINT32 SrcSize,\r
31 OUT UINT32 *DstSize,\r
32 OUT UINT32 *ScratchSize\r
33 );\r
34/**\r
35\r
36Routine Description:\r
37\r
38 The implementation Efi Decompress GetInfo().\r
39\r
40Arguments:\r
41\r
42 Source - The source buffer containing the compressed data.\r
43 SrcSize - The size of source buffer\r
44 DstSize - The size of destination buffer.\r
45 ScratchSize - The size of scratch buffer.\r
46\r
47Returns:\r
48\r
49 EFI_SUCCESS - The size of destination buffer and the size of scratch buffer are successull retrieved.\r
50 EFI_INVALID_PARAMETER - The source data is corrupted\r
51\r
52**/\r
53\r
54EFI_STATUS\r
55EfiDecompress (\r
56 IN VOID *Source,\r
57 IN UINT32 SrcSize,\r
58 IN OUT VOID *Destination,\r
59 IN UINT32 DstSize,\r
60 IN OUT VOID *Scratch,\r
61 IN UINT32 ScratchSize\r
62 );\r
63/**\r
64\r
65Routine Description:\r
66\r
67 The implementation of Efi Decompress().\r
68\r
69Arguments:\r
70\r
71 Source - The source buffer containing the compressed data.\r
72 SrcSize - The size of source buffer\r
73 Destination - The destination buffer to store the decompressed data\r
74 DstSize - The size of destination buffer.\r
75 Scratch - The buffer used internally by the decompress routine. This buffer is needed to store intermediate data.\r
76 ScratchSize - The size of scratch buffer.\r
77\r
78Returns:\r
79\r
80 EFI_SUCCESS - Decompression is successfull\r
81 EFI_INVALID_PARAMETER - The source data is corrupted\r
82\r
83**/\r
84\r
85EFI_STATUS\r
86TianoGetInfo (\r
87 IN VOID *Source,\r
88 IN UINT32 SrcSize,\r
89 OUT UINT32 *DstSize,\r
90 OUT UINT32 *ScratchSize\r
91 );\r
92/**\r
93\r
94Routine Description:\r
95\r
96 The implementation Tiano Decompress GetInfo().\r
97\r
98Arguments:\r
99\r
100 Source - The source buffer containing the compressed data.\r
101 SrcSize - The size of source buffer\r
102 DstSize - The size of destination buffer.\r
103 ScratchSize - The size of scratch buffer.\r
104\r
105Returns:\r
106\r
107 EFI_SUCCESS - The size of destination buffer and the size of scratch buffer are successull retrieved.\r
108 EFI_INVALID_PARAMETER - The source data is corrupted\r
109\r
110**/\r
111\r
112EFI_STATUS\r
113TianoDecompress (\r
114 IN VOID *Source,\r
115 IN UINT32 SrcSize,\r
116 IN OUT VOID *Destination,\r
117 IN UINT32 DstSize,\r
118 IN OUT VOID *Scratch,\r
119 IN UINT32 ScratchSize\r
120 );\r
121/**\r
122\r
123Routine Description:\r
124\r
125 The implementation of Tiano Decompress().\r
126\r
127Arguments:\r
128\r
129 Source - The source buffer containing the compressed data.\r
130 SrcSize - The size of source buffer\r
131 Destination - The destination buffer to store the decompressed data\r
132 DstSize - The size of destination buffer.\r
133 Scratch - The buffer used internally by the decompress routine. This buffer is needed to store intermediate data.\r
134 ScratchSize - The size of scratch buffer.\r
135\r
136Returns:\r
137\r
138 EFI_SUCCESS - Decompression is successfull\r
139 EFI_INVALID_PARAMETER - The source data is corrupted\r
140\r
141**/\r
142\r
143typedef\r
144EFI_STATUS\r
145(*GETINFO_FUNCTION) (\r
146 IN VOID *Source,\r
147 IN UINT32 SrcSize,\r
148 OUT UINT32 *DstSize,\r
149 OUT UINT32 *ScratchSize\r
150 );\r
151\r
152typedef\r
153EFI_STATUS\r
154(*DECOMPRESS_FUNCTION) (\r
155 IN VOID *Source,\r
156 IN UINT32 SrcSize,\r
157 IN OUT VOID *Destination,\r
158 IN UINT32 DstSize,\r
159 IN OUT VOID *Scratch,\r
160 IN UINT32 ScratchSize\r
161 );\r
162\r
163EFI_STATUS\r
164Extract (\r
165 IN VOID *Source,\r
166 IN UINT32 SrcSize,\r
167 OUT VOID **Destination,\r
168 OUT UINT32 *DstSize,\r
169 IN UINTN Algorithm\r
170 );\r
171\r
172#endif\r