]> git.proxmox.com Git - mirror_edk2.git/blob - Tools/CCode/Source/Common/Compress.h
The main issue want to be resolve is that some tools need EfiCompress and other tools...
[mirror_edk2.git] / Tools / CCode / Source / Common / Compress.h
1 /*++
2
3 Copyright (c) 2004 - 2006, 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 Compress.h
15
16 Abstract:
17
18 Header file for compression routine.
19 Providing both EFI and Tiano Compress algorithms.
20
21 --*/
22
23 #ifndef _COMPRESS_H_
24 #define _COMPRESS_H_
25
26 #include <string.h>
27 #include <stdlib.h>
28
29 #include <Common/UefiBaseTypes.h>
30 /*++
31
32 Routine Description:
33
34 Tiano compression routine.
35
36 --*/
37 EFI_STATUS
38 TianoCompress (
39 IN UINT8 *SrcBuffer,
40 IN UINT32 SrcSize,
41 IN UINT8 *DstBuffer,
42 IN OUT UINT32 *DstSize
43 )
44 ;
45
46 /*++
47
48 Routine Description:
49
50 Efi compression routine.
51
52 --*/
53 EFI_STATUS
54 EfiCompress (
55 IN UINT8 *SrcBuffer,
56 IN UINT32 SrcSize,
57 IN UINT8 *DstBuffer,
58 IN OUT UINT32 *DstSize
59 )
60 ;
61
62 /*++
63
64 Routine Description:
65
66 The compression routine.
67
68 Arguments:
69
70 SrcBuffer - The buffer storing the source data
71 SrcSize - The size of source data
72 DstBuffer - The buffer to store the compressed data
73 DstSize - On input, the size of DstBuffer; On output,
74 the size of the actual compressed data.
75
76 Returns:
77
78 EFI_BUFFER_TOO_SMALL - The DstBuffer is too small. In this case,
79 DstSize contains the size needed.
80 EFI_SUCCESS - Compression is successful.
81 EFI_OUT_OF_RESOURCES - No resource to complete function.
82 EFI_INVALID_PARAMETER - Parameter supplied is wrong.
83
84 --*/
85 typedef
86 EFI_STATUS
87 (*COMPRESS_FUNCTION) (
88 IN UINT8 *SrcBuffer,
89 IN UINT32 SrcSize,
90 IN UINT8 *DstBuffer,
91 IN OUT UINT32 *DstSize
92 );
93
94 #endif