]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Sample/Tools/Source/Common/EfiCustomizedCompress.h
Maintainers.txt: Remove EdkCompatibilityPkg information
[mirror_edk2.git] / EdkCompatibilityPkg / Sample / Tools / Source / Common / EfiCustomizedCompress.h
CommitLineData
3eb9473e 1/*++\r
2\r
4b1e1121
HT
3Copyright (c) 2004, Intel Corporation. All rights reserved.<BR>\r
4This program and the accompanying materials \r
3eb9473e 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
e00e1d46 27 );\r
3eb9473e 28\r
29/*++\r
30\r
31Routine Description:\r
32\r
33The implementation of Customized SetCompressionType().\r
34\r
35Arguments:\r
36 Type - The type if compression.\r
37 \r
38Returns:\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
45EFI_STATUS\r
46CustomizedGetInfo (\r
47 IN VOID *Source,\r
48 IN UINT32 SrcSize,\r
49 OUT UINT32 *DstSize,\r
50 OUT UINT32 *ScratchSize\r
e00e1d46 51 );\r
3eb9473e 52\r
53/*++\r
54\r
55Routine Description:\r
56\r
57 The implementation of Customized GetInfo().\r
58\r
59Arguments:\r
60\r
61 Source - The source buffer containing the compressed data.\r
62 SrcSize - The size of source buffer\r
63 DstSize - The size of destination buffer.\r
64 ScratchSize - The size of scratch buffer.\r
65\r
66Returns:\r
67\r
4fc0be87 68 EFI_SUCCESS - The size of destination buffer and the size of scratch buffer are successfully retrieved.\r
3eb9473e 69 EFI_INVALID_PARAMETER - The source data is corrupted\r
70\r
71--*/\r
72EFI_STATUS\r
73CustomizedDecompress (\r
74 IN VOID *Source,\r
75 IN UINT32 SrcSize,\r
76 IN OUT VOID *Destination,\r
77 IN UINT32 DstSize,\r
78 IN OUT VOID *Scratch,\r
79 IN UINT32 ScratchSize\r
e00e1d46 80 );\r
3eb9473e 81\r
82/*++\r
83\r
84Routine Description:\r
85\r
86 The implementation of Customized Decompress().\r
87\r
88Arguments:\r
89\r
90 This - The protocol instance pointer\r
91 Source - The source buffer containing the compressed data.\r
92 SrcSize - The size of source buffer\r
93 Destination - The destination buffer to store the decompressed data\r
94 DstSize - The size of destination buffer.\r
95 Scratch - The buffer used internally by the decompress routine. This buffer is needed to store intermediate data.\r
96 ScratchSize - The size of scratch buffer.\r
97\r
98Returns:\r
99\r
100 EFI_SUCCESS - Decompression is successfull\r
101 EFI_INVALID_PARAMETER - The source data is corrupted\r
102\r
103--*/\r
104EFI_STATUS\r
105CustomizedCompress (\r
106 IN UINT8 *SrcBuffer,\r
107 IN UINT32 SrcSize,\r
108 IN UINT8 *DstBuffer,\r
109 IN OUT UINT32 *DstSize\r
e00e1d46 110 );\r
3eb9473e 111\r
112/*++\r
113\r
114Routine Description:\r
115\r
116 The Customized compression routine.\r
117\r
118Arguments:\r
119\r
120 SrcBuffer - The buffer storing the source data\r
121 SrcSize - The size of source data\r
122 DstBuffer - The buffer to store the compressed data\r
123 DstSize - On input, the size of DstBuffer; On output,\r
124 the size of the actual compressed data.\r
125\r
126Returns:\r
127\r
128 EFI_BUFFER_TOO_SMALL - The DstBuffer is too small. In this case,\r
129 DstSize contains the size needed.\r
130 EFI_SUCCESS - Compression is successful.\r
131\r
132--*/\r
133\r
b4e547b6 134#endif\r