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