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