]>
Commit | Line | Data |
---|---|---|
1 | /** @file\r | |
2 | \r | |
3 | Copyright (c) 2006 - 2008, Intel Corporation \r | |
4 | All rights reserved. This program and the accompanying materials \r | |
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 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 | |
27 | EFI_STATUS\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 Efi Decompress GetInfo().\r | |
39 | \r | |
40 | Arguments:\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 | |
47 | Returns:\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 | |
54 | EFI_STATUS\r | |
55 | EfiDecompress (\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 | |
65 | Routine Description:\r | |
66 | \r | |
67 | The implementation of Efi Decompress().\r | |
68 | \r | |
69 | Arguments:\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 | |
78 | Returns:\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 | |
85 | EFI_STATUS\r | |
86 | TianoGetInfo (\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 | |
94 | Routine Description:\r | |
95 | \r | |
96 | The implementation Tiano Decompress GetInfo().\r | |
97 | \r | |
98 | Arguments:\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 | |
105 | Returns:\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 | |
112 | EFI_STATUS\r | |
113 | TianoDecompress (\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 | |
123 | Routine Description:\r | |
124 | \r | |
125 | The implementation of Tiano Decompress().\r | |
126 | \r | |
127 | Arguments:\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 | |
136 | Returns:\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 | |
143 | typedef\r | |
144 | EFI_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 | |
152 | typedef\r | |
153 | EFI_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 | |
163 | EFI_STATUS\r | |
164 | Extract (\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 |