]>
Commit | Line | Data |
---|---|---|
30fdf114 | 1 | /** @file\r |
97fa0ee9 | 2 | Header file for compression routine\r |
30fdf114 | 3 | \r |
f7496d71 | 4 | Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r |
2e351cbe | 5 | SPDX-License-Identifier: BSD-2-Clause-Patent\r |
30fdf114 | 6 | \r |
30fdf114 LG |
7 | **/\r |
8 | \r | |
9 | #ifndef _EFI_DECOMPRESS_H\r | |
10 | #define _EFI_DECOMPRESS_H\r | |
11 | \r | |
12 | #include <Common/UefiBaseTypes.h>\r | |
13 | \r | |
14 | EFI_STATUS\r | |
15 | EfiGetInfo (\r | |
16 | IN VOID *Source,\r | |
17 | IN UINT32 SrcSize,\r | |
18 | OUT UINT32 *DstSize,\r | |
19 | OUT UINT32 *ScratchSize\r | |
20 | );\r | |
21 | /**\r | |
22 | \r | |
23 | Routine Description:\r | |
24 | \r | |
25 | The implementation Efi Decompress GetInfo().\r | |
26 | \r | |
27 | Arguments:\r | |
28 | \r | |
29 | Source - The source buffer containing the compressed data.\r | |
30 | SrcSize - The size of source buffer\r | |
31 | DstSize - The size of destination buffer.\r | |
32 | ScratchSize - The size of scratch buffer.\r | |
33 | \r | |
34 | Returns:\r | |
35 | \r | |
99e55970 | 36 | EFI_SUCCESS - The size of destination buffer and the size of scratch buffer are successfully retrieved.\r |
30fdf114 LG |
37 | EFI_INVALID_PARAMETER - The source data is corrupted\r |
38 | \r | |
39 | **/\r | |
40 | \r | |
41 | EFI_STATUS\r | |
42 | EfiDecompress (\r | |
43 | IN VOID *Source,\r | |
44 | IN UINT32 SrcSize,\r | |
45 | IN OUT VOID *Destination,\r | |
46 | IN UINT32 DstSize,\r | |
47 | IN OUT VOID *Scratch,\r | |
48 | IN UINT32 ScratchSize\r | |
49 | );\r | |
50 | /**\r | |
51 | \r | |
52 | Routine Description:\r | |
53 | \r | |
54 | The implementation of Efi Decompress().\r | |
55 | \r | |
56 | Arguments:\r | |
57 | \r | |
58 | Source - The source buffer containing the compressed data.\r | |
59 | SrcSize - The size of source buffer\r | |
60 | Destination - The destination buffer to store the decompressed data\r | |
61 | DstSize - The size of destination buffer.\r | |
62 | Scratch - The buffer used internally by the decompress routine. This buffer is needed to store intermediate data.\r | |
63 | ScratchSize - The size of scratch buffer.\r | |
64 | \r | |
65 | Returns:\r | |
66 | \r | |
fb0b35e0 | 67 | EFI_SUCCESS - Decompression is successful\r |
30fdf114 LG |
68 | EFI_INVALID_PARAMETER - The source data is corrupted\r |
69 | \r | |
70 | **/\r | |
71 | \r | |
72 | EFI_STATUS\r | |
73 | TianoGetInfo (\r | |
74 | IN VOID *Source,\r | |
75 | IN UINT32 SrcSize,\r | |
76 | OUT UINT32 *DstSize,\r | |
77 | OUT UINT32 *ScratchSize\r | |
78 | );\r | |
79 | /**\r | |
80 | \r | |
81 | Routine Description:\r | |
82 | \r | |
83 | The implementation Tiano Decompress GetInfo().\r | |
84 | \r | |
85 | Arguments:\r | |
86 | \r | |
87 | Source - The source buffer containing the compressed data.\r | |
88 | SrcSize - The size of source buffer\r | |
89 | DstSize - The size of destination buffer.\r | |
90 | ScratchSize - The size of scratch buffer.\r | |
91 | \r | |
92 | Returns:\r | |
93 | \r | |
99e55970 | 94 | EFI_SUCCESS - The size of destination buffer and the size of scratch buffer are successfully retrieved.\r |
30fdf114 LG |
95 | EFI_INVALID_PARAMETER - The source data is corrupted\r |
96 | \r | |
97 | **/\r | |
98 | \r | |
99 | EFI_STATUS\r | |
100 | TianoDecompress (\r | |
101 | IN VOID *Source,\r | |
102 | IN UINT32 SrcSize,\r | |
103 | IN OUT VOID *Destination,\r | |
104 | IN UINT32 DstSize,\r | |
105 | IN OUT VOID *Scratch,\r | |
106 | IN UINT32 ScratchSize\r | |
107 | );\r | |
108 | /**\r | |
109 | \r | |
110 | Routine Description:\r | |
111 | \r | |
112 | The implementation of Tiano Decompress().\r | |
113 | \r | |
114 | Arguments:\r | |
115 | \r | |
116 | Source - The source buffer containing the compressed data.\r | |
117 | SrcSize - The size of source buffer\r | |
118 | Destination - The destination buffer to store the decompressed data\r | |
119 | DstSize - The size of destination buffer.\r | |
120 | Scratch - The buffer used internally by the decompress routine. This buffer is needed to store intermediate data.\r | |
121 | ScratchSize - The size of scratch buffer.\r | |
122 | \r | |
123 | Returns:\r | |
124 | \r | |
fb0b35e0 | 125 | EFI_SUCCESS - Decompression is successful\r |
30fdf114 LG |
126 | EFI_INVALID_PARAMETER - The source data is corrupted\r |
127 | \r | |
128 | **/\r | |
129 | \r | |
130 | typedef\r | |
131 | EFI_STATUS\r | |
132 | (*GETINFO_FUNCTION) (\r | |
133 | IN VOID *Source,\r | |
134 | IN UINT32 SrcSize,\r | |
135 | OUT UINT32 *DstSize,\r | |
136 | OUT UINT32 *ScratchSize\r | |
137 | );\r | |
138 | \r | |
139 | typedef\r | |
140 | EFI_STATUS\r | |
141 | (*DECOMPRESS_FUNCTION) (\r | |
142 | IN VOID *Source,\r | |
143 | IN UINT32 SrcSize,\r | |
144 | IN OUT VOID *Destination,\r | |
145 | IN UINT32 DstSize,\r | |
146 | IN OUT VOID *Scratch,\r | |
147 | IN UINT32 ScratchSize\r | |
148 | );\r | |
149 | \r | |
150 | EFI_STATUS\r | |
151 | Extract (\r | |
152 | IN VOID *Source,\r | |
153 | IN UINT32 SrcSize,\r | |
154 | OUT VOID **Destination,\r | |
155 | OUT UINT32 *DstSize,\r | |
156 | IN UINTN Algorithm\r | |
157 | );\r | |
158 | \r | |
159 | #endif\r |