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