]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Sample/Tools/Source/Common/EfiCustomizedCompress.h
Add in the 1st version of ECP.
[mirror_edk2.git] / EdkCompatibilityPkg / Sample / Tools / Source / Common / EfiCustomizedCompress.h
CommitLineData
3eb9473e 1/*++\r
2\r
3Copyright (c) 2004, Intel Corporation \r
4All rights reserved. This program and the accompanying materials \r
5are licensed and made available under the terms and conditions of the BSD License \r
6which accompanies this distribution. The full text of the license may be found at \r
7http://opensource.org/licenses/bsd-license.php \r
8 \r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
11\r
12Module Name:\r
13 \r
14 EfiCustomizedCompress.h\r
15\r
16Abstract:\r
17\r
18 Header file for Customized compression routine\r
19 \r
20--*/\r
21\r
22#ifndef _EFICUSTOMIZEDCOMPRESS_H\r
23#define _EFICUSTOMIZEDCOMPRESS_H\r
24EFI_STATUS\r
25SetCustomizedCompressionType (\r
26 IN CHAR8 *Type\r
27 )\r
28;\r
29\r
30/*++\r
31\r
32Routine Description:\r
33\r
34The implementation of Customized SetCompressionType().\r
35\r
36Arguments:\r
37 Type - The type if compression.\r
38 \r
39Returns:\r
40 \r
41 EFI_SUCCESS - The type has been set.\r
42 EFI_UNSUPPORTED - This type is unsupported.\r
43\r
44 \r
45--*/\r
46EFI_STATUS\r
47CustomizedGetInfo (\r
48 IN VOID *Source,\r
49 IN UINT32 SrcSize,\r
50 OUT UINT32 *DstSize,\r
51 OUT UINT32 *ScratchSize\r
52 )\r
53;\r
54\r
55/*++\r
56\r
57Routine Description:\r
58\r
59 The implementation of Customized GetInfo().\r
60\r
61Arguments:\r
62\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
68Returns:\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\r
73--*/\r
74EFI_STATUS\r
75CustomizedDecompress (\r
76 IN VOID *Source,\r
77 IN UINT32 SrcSize,\r
78 IN OUT VOID *Destination,\r
79 IN UINT32 DstSize,\r
80 IN OUT VOID *Scratch,\r
81 IN UINT32 ScratchSize\r
82 )\r
83;\r
84\r
85/*++\r
86\r
87Routine Description:\r
88\r
89 The implementation of Customized Decompress().\r
90\r
91Arguments:\r
92\r
93 This - The protocol instance pointer\r
94 Source - The source buffer containing the compressed data.\r
95 SrcSize - The size of source buffer\r
96 Destination - The destination buffer to store the decompressed data\r
97 DstSize - The size of destination buffer.\r
98 Scratch - The buffer used internally by the decompress routine. This buffer is needed to store intermediate data.\r
99 ScratchSize - The size of scratch buffer.\r
100\r
101Returns:\r
102\r
103 EFI_SUCCESS - Decompression is successfull\r
104 EFI_INVALID_PARAMETER - The source data is corrupted\r
105\r
106--*/\r
107EFI_STATUS\r
108CustomizedCompress (\r
109 IN UINT8 *SrcBuffer,\r
110 IN UINT32 SrcSize,\r
111 IN UINT8 *DstBuffer,\r
112 IN OUT UINT32 *DstSize\r
113 )\r
114;\r
115\r
116/*++\r
117\r
118Routine Description:\r
119\r
120 The Customized compression routine.\r
121\r
122Arguments:\r
123\r
124 SrcBuffer - The buffer storing the source data\r
125 SrcSize - The size of source data\r
126 DstBuffer - The buffer to store the compressed data\r
127 DstSize - On input, the size of DstBuffer; On output,\r
128 the size of the actual compressed data.\r
129\r
130Returns:\r
131\r
132 EFI_BUFFER_TOO_SMALL - The DstBuffer is too small. In this case,\r
133 DstSize contains the size needed.\r
134 EFI_SUCCESS - Compression is successful.\r
135\r
136--*/\r
137\r
138#endif