]>
Commit | Line | Data |
---|---|---|
30fdf114 | 1 | /** @file\r |
97fa0ee9 | 2 | Header file for compression routine\r |
30fdf114 | 3 | \r |
97fa0ee9 | 4 | Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r |
40d841f6 | 5 | This program and the accompanying materials \r |
30fdf114 LG |
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 | |
9 | \r | |
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 | |
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 | |
20 | EFI_STATUS\r | |
21 | EfiGetInfo (\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 | |
29 | Routine Description:\r | |
30 | \r | |
31 | The implementation Efi Decompress GetInfo().\r | |
32 | \r | |
33 | Arguments:\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 | |
40 | Returns:\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 | |
47 | EFI_STATUS\r | |
48 | EfiDecompress (\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 | |
58 | Routine Description:\r | |
59 | \r | |
60 | The implementation of Efi Decompress().\r | |
61 | \r | |
62 | Arguments:\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 | |
71 | Returns:\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 | |
78 | EFI_STATUS\r | |
79 | TianoGetInfo (\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 | |
87 | Routine Description:\r | |
88 | \r | |
89 | The implementation Tiano Decompress GetInfo().\r | |
90 | \r | |
91 | Arguments:\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 | |
98 | Returns:\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 | |
105 | EFI_STATUS\r | |
106 | TianoDecompress (\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 | |
116 | Routine Description:\r | |
117 | \r | |
118 | The implementation of Tiano Decompress().\r | |
119 | \r | |
120 | Arguments:\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 | |
129 | Returns:\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 | |
136 | typedef\r | |
137 | EFI_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 | |
145 | typedef\r | |
146 | EFI_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 | |
156 | EFI_STATUS\r | |
157 | Extract (\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 |