]> git.proxmox.com Git - mirror_edk2.git/blame - Tools/CodeTools/TianoTools/Common/EfiCustomizedCompress.h
Restructuring for better separation of Tool packages.
[mirror_edk2.git] / Tools / CodeTools / TianoTools / Common / EfiCustomizedCompress.h
CommitLineData
878ddf1f 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
878ddf1f 22#ifndef _EFICUSTOMIZEDCOMPRESS_H\r
23#define _EFICUSTOMIZEDCOMPRESS_H\r
ce53a8c3 24\r
25#include <Common/UefiBaseTypes.h>\r
26\r
878ddf1f 27EFI_STATUS\r
28SetCustomizedCompressionType (\r
29 IN CHAR8 *Type\r
30 )\r
31;\r
32\r
33/*++\r
34\r
35Routine Description:\r
36\r
37The implementation of Customized SetCompressionType().\r
38\r
39Arguments:\r
40 Type - The type if compression.\r
41 \r
42Returns:\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
49EFI_STATUS\r
50CustomizedGetInfo (\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
60Routine Description:\r
61\r
62 The implementation of Customized GetInfo().\r
63\r
64Arguments:\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
71Returns:\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
77EFI_STATUS\r
78CustomizedDecompress (\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
90Routine Description:\r
91\r
92 The implementation of Customized Decompress().\r
93\r
94Arguments:\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
104Returns:\r
105\r
106 EFI_SUCCESS - Decompression is successfull\r
107 EFI_INVALID_PARAMETER - The source data is corrupted\r
108\r
109--*/\r
110EFI_STATUS\r
111CustomizedCompress (\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
121Routine Description:\r
122\r
123 The Customized compression routine.\r
124\r
125Arguments:\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
133Returns:\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