]>
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 | CustomizedCompress.c\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 | EFI_STATUS\r | |
26 | SetCustomizedCompressionType (\r | |
27 | IN CHAR8 *Type\r | |
28 | )\r | |
29 | /*++\r | |
30 | \r | |
31 | Routine Description:\r | |
32 | \r | |
33 | The implementation of Customized SetCompressionType().\r | |
34 | \r | |
35 | Arguments:\r | |
36 | Type - The type if compression.\r | |
37 | \r | |
38 | Returns:\r | |
39 | \r | |
40 | EFI_SUCCESS - The type has been set.\r | |
41 | EFI_UNSUPPORTED - This type is unsupported.\r | |
42 | \r | |
43 | \r | |
44 | --*/\r | |
45 | {\r | |
46 | return EFI_UNSUPPORTED;\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 | Routine Description:\r | |
59 | \r | |
60 | The implementation of Customized GetInfo().\r | |
61 | \r | |
62 | Arguments:\r | |
63 | Source - The source buffer containing the compressed data.\r | |
64 | SrcSize - The size of source buffer\r | |
65 | DstSize - The size of destination buffer.\r | |
66 | ScratchSize - The size of scratch buffer.\r | |
67 | \r | |
68 | Returns:\r | |
69 | \r | |
70 | EFI_SUCCESS - The size of destination buffer and the size of scratch buffer are successull retrieved.\r | |
71 | EFI_INVALID_PARAMETER - The source data is corrupted\r | |
72 | EFI_UNSUPPORTED - The operation is unsupported.\r | |
73 | \r | |
74 | \r | |
75 | --*/\r | |
76 | {\r | |
77 | return EFI_UNSUPPORTED;\r | |
78 | }\r | |
79 | \r | |
80 | EFI_STATUS\r | |
81 | CustomizedDecompress (\r | |
82 | IN VOID *Source,\r | |
83 | IN UINT32 SrcSize,\r | |
84 | IN OUT VOID *Destination,\r | |
85 | IN UINT32 DstSize,\r | |
86 | IN OUT VOID *Scratch,\r | |
87 | IN UINT32 ScratchSize\r | |
88 | )\r | |
89 | /*++\r | |
90 | \r | |
91 | Routine Description:\r | |
92 | \r | |
93 | The implementation of Customized Decompress().\r | |
94 | \r | |
95 | Arguments:\r | |
96 | \r | |
97 | This - The protocol instance pointer\r | |
98 | Source - The source buffer containing the compressed data.\r | |
99 | SrcSize - The size of source buffer\r | |
100 | Destination - The destination buffer to store the decompressed data\r | |
101 | DstSize - The size of destination buffer.\r | |
102 | Scratch - The buffer used internally by the decompress routine. This buffer is needed to store intermediate data.\r | |
103 | ScratchSize - The size of scratch buffer.\r | |
104 | \r | |
105 | Returns:\r | |
106 | \r | |
107 | EFI_SUCCESS - Decompression is successfull\r | |
108 | EFI_INVALID_PARAMETER - The source data is corrupted\r | |
109 | EFI_UNSUPPORTED - The operation is unsupported.\r | |
110 | \r | |
111 | --*/\r | |
112 | {\r | |
113 | return EFI_UNSUPPORTED;\r | |
114 | }\r | |
115 | \r | |
116 | EFI_STATUS\r | |
117 | CustomizedCompress (\r | |
118 | IN UINT8 *SrcBuffer,\r | |
119 | IN UINT32 SrcSize,\r | |
120 | IN UINT8 *DstBuffer,\r | |
121 | IN OUT UINT32 *DstSize\r | |
122 | )\r | |
123 | /*++\r | |
124 | \r | |
125 | Routine Description:\r | |
126 | \r | |
127 | The Customized compression routine.\r | |
128 | \r | |
129 | Arguments:\r | |
130 | \r | |
131 | SrcBuffer - The buffer storing the source data\r | |
132 | SrcSize - The size of source data\r | |
133 | DstBuffer - The buffer to store the compressed data\r | |
134 | DstSize - On input, the size of DstBuffer; On output,\r | |
135 | the size of the actual compressed data.\r | |
136 | \r | |
137 | Returns:\r | |
138 | \r | |
139 | EFI_BUFFER_TOO_SMALL - The DstBuffer is too small. In this case,\r | |
140 | DstSize contains the size needed.\r | |
141 | EFI_SUCCESS - Compression is successful.\r | |
142 | \r | |
143 | EFI_UNSUPPORTED - The operation is unsupported.\r | |
144 | --*/\r | |
145 | {\r | |
146 | return EFI_UNSUPPORTED;\r | |
147 | }\r |