]>
Commit | Line | Data |
---|---|---|
878ddf1f | 1 | /*++\r |
2 | \r | |
3 | Copyright (c) 2004, 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 | EfiCustomizedCompress.h\r | |
15 | \r | |
16 | Abstract:\r | |
17 | \r | |
18 | Header file for Customized compression routine\r | |
19 | \r | |
20 | --*/\r | |
21 | \r | |
22 | #include <Base.h>\r | |
23 | #include <UefiBaseTypes.h>\r | |
24 | \r | |
25 | #ifndef _EFICUSTOMIZEDCOMPRESS_H\r | |
26 | #define _EFICUSTOMIZEDCOMPRESS_H\r | |
27 | EFI_STATUS\r | |
28 | SetCustomizedCompressionType (\r | |
29 | IN CHAR8 *Type\r | |
30 | )\r | |
31 | ;\r | |
32 | \r | |
33 | /*++\r | |
34 | \r | |
35 | Routine Description:\r | |
36 | \r | |
37 | The implementation of Customized SetCompressionType().\r | |
38 | \r | |
39 | Arguments:\r | |
40 | Type - The type if compression.\r | |
41 | \r | |
42 | Returns:\r | |
43 | \r | |
44 | EFI_SUCCESS - The type has been set.\r | |
45 | EFI_UNSUPPORTED - This type is unsupported.\r | |
46 | \r | |
47 | \r | |
48 | --*/\r | |
49 | EFI_STATUS\r | |
50 | CustomizedGetInfo (\r | |
51 | IN VOID *Source,\r | |
52 | IN UINT32 SrcSize,\r | |
53 | OUT UINT32 *DstSize,\r | |
54 | OUT UINT32 *ScratchSize\r | |
55 | )\r | |
56 | ;\r | |
57 | \r | |
58 | /*++\r | |
59 | \r | |
60 | Routine Description:\r | |
61 | \r | |
62 | The implementation of Customized GetInfo().\r | |
63 | \r | |
64 | Arguments:\r | |
65 | \r | |
66 | Source - The source buffer containing the compressed data.\r | |
67 | SrcSize - The size of source buffer\r | |
68 | DstSize - The size of destination buffer.\r | |
69 | ScratchSize - The size of scratch buffer.\r | |
70 | \r | |
71 | Returns:\r | |
72 | \r | |
73 | EFI_SUCCESS - The size of destination buffer and the size of scratch buffer are successull retrieved.\r | |
74 | EFI_INVALID_PARAMETER - The source data is corrupted\r | |
75 | \r | |
76 | --*/\r | |
77 | EFI_STATUS\r | |
78 | CustomizedDecompress (\r | |
79 | IN VOID *Source,\r | |
80 | IN UINT32 SrcSize,\r | |
81 | IN OUT VOID *Destination,\r | |
82 | IN UINT32 DstSize,\r | |
83 | IN OUT VOID *Scratch,\r | |
84 | IN UINT32 ScratchSize\r | |
85 | )\r | |
86 | ;\r | |
87 | \r | |
88 | /*++\r | |
89 | \r | |
90 | Routine Description:\r | |
91 | \r | |
92 | The implementation of Customized Decompress().\r | |
93 | \r | |
94 | Arguments:\r | |
95 | \r | |
96 | This - The protocol instance pointer\r | |
97 | Source - The source buffer containing the compressed data.\r | |
98 | SrcSize - The size of source buffer\r | |
99 | Destination - The destination buffer to store the decompressed data\r | |
100 | DstSize - The size of destination buffer.\r | |
101 | Scratch - The buffer used internally by the decompress routine. This buffer is needed to store intermediate data.\r | |
102 | ScratchSize - The size of scratch buffer.\r | |
103 | \r | |
104 | Returns:\r | |
105 | \r | |
106 | EFI_SUCCESS - Decompression is successfull\r | |
107 | EFI_INVALID_PARAMETER - The source data is corrupted\r | |
108 | \r | |
109 | --*/\r | |
110 | EFI_STATUS\r | |
111 | CustomizedCompress (\r | |
112 | IN UINT8 *SrcBuffer,\r | |
113 | IN UINT32 SrcSize,\r | |
114 | IN UINT8 *DstBuffer,\r | |
115 | IN OUT UINT32 *DstSize\r | |
116 | )\r | |
117 | ;\r | |
118 | \r | |
119 | /*++\r | |
120 | \r | |
121 | Routine Description:\r | |
122 | \r | |
123 | The Customized compression routine.\r | |
124 | \r | |
125 | Arguments:\r | |
126 | \r | |
127 | SrcBuffer - The buffer storing the source data\r | |
128 | SrcSize - The size of source data\r | |
129 | DstBuffer - The buffer to store the compressed data\r | |
130 | DstSize - On input, the size of DstBuffer; On output,\r | |
131 | the size of the actual compressed data.\r | |
132 | \r | |
133 | Returns:\r | |
134 | \r | |
135 | EFI_BUFFER_TOO_SMALL - The DstBuffer is too small. In this case,\r | |
136 | DstSize contains the size needed.\r | |
137 | EFI_SUCCESS - Compression is successful.\r | |
138 | \r | |
139 | --*/\r | |
140 | \r | |
141 | #endif\r |