]> git.proxmox.com Git - mirror_edk2.git/blob - Tools/Source/TianoTools/Common/EfiDecompress.h
c5004a74a97dff8600123bbdf588484770a4921f
[mirror_edk2.git] / Tools / Source / TianoTools / Common / EfiDecompress.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 EfiDecompress.h
15
16 Abstract:
17
18 Header file for compression routine
19
20 --*/
21 #include <Base.h>
22 #include <UefiBaseTypes.h>
23
24 #ifndef _EFI_DECOMPRESS_H
25 #define _EFI_DECOMPRESS_H
26 EFI_STATUS
27 GetInfo (
28 IN VOID *Source,
29 IN UINT32 SrcSize,
30 OUT UINT32 *DstSize,
31 OUT UINT32 *ScratchSize
32 );
33
34 /*++
35
36 Routine Description:
37
38 The implementation of EFI_DECOMPRESS_PROTOCOL.GetInfo().
39
40 Arguments:
41
42 Source - The source buffer containing the compressed data.
43 SrcSize - The size of source buffer
44 DstSize - The size of destination buffer.
45 ScratchSize - The size of scratch buffer.
46
47 Returns:
48
49 EFI_SUCCESS - The size of destination buffer and the size of scratch buffer are successull retrieved.
50 EFI_INVALID_PARAMETER - The source data is corrupted
51
52 --*/
53 EFI_STATUS
54 Decompress (
55 IN VOID *Source,
56 IN UINT32 SrcSize,
57 IN OUT VOID *Destination,
58 IN UINT32 DstSize,
59 IN OUT VOID *Scratch,
60 IN UINT32 ScratchSize
61 )
62 ;
63
64 /*++
65
66 Routine Description:
67
68 The implementation of EFI_DECOMPRESS_PROTOCOL.Decompress().
69
70 Arguments:
71
72 This - The protocol instance pointer
73 Source - The source buffer containing the compressed data.
74 SrcSize - The size of source buffer
75 Destination - The destination buffer to store the decompressed data
76 DstSize - The size of destination buffer.
77 Scratch - The buffer used internally by the decompress routine. This buffer is needed to store intermediate data.
78 ScratchSize - The size of scratch buffer.
79
80 Returns:
81
82 EFI_SUCCESS - Decompression is successfull
83 EFI_INVALID_PARAMETER - The source data is corrupted
84
85 --*/
86 typedef
87 EFI_STATUS
88 (*GETINFO_FUNCTION) (
89 IN VOID *Source,
90 IN UINT32 SrcSize,
91 OUT UINT32 *DstSize,
92 OUT UINT32 *ScratchSize
93 );
94
95 typedef
96 EFI_STATUS
97 (*DECOMPRESS_FUNCTION) (
98 IN VOID *Source,
99 IN UINT32 SrcSize,
100 IN OUT VOID *Destination,
101 IN UINT32 DstSize,
102 IN OUT VOID *Scratch,
103 IN UINT32 ScratchSize
104 );
105 #endif