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