]> git.proxmox.com Git - mirror_edk2.git/blob - BaseTools/Source/C/Common/Compress.h
Check In tool source code based on Build tool project revision r1655.
[mirror_edk2.git] / BaseTools / Source / C / Common / Compress.h
1 /** @file
2
3 Copyright (c) 2004 - 2008, 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 "CommonLib.h"
30 #include <Common/UefiBaseTypes.h>
31 /*++
32
33 Routine Description:
34
35 Tiano compression routine.
36
37 --*/
38 EFI_STATUS
39 TianoCompress (
40 IN UINT8 *SrcBuffer,
41 IN UINT32 SrcSize,
42 IN UINT8 *DstBuffer,
43 IN OUT UINT32 *DstSize
44 )
45 ;
46
47 /*++
48
49 Routine Description:
50
51 Efi compression routine.
52
53 --*/
54 EFI_STATUS
55 EfiCompress (
56 IN UINT8 *SrcBuffer,
57 IN UINT32 SrcSize,
58 IN UINT8 *DstBuffer,
59 IN OUT UINT32 *DstSize
60 )
61 ;
62
63 /*++
64
65 Routine Description:
66
67 The compression routine.
68
69 Arguments:
70
71 SrcBuffer - The buffer storing the source data
72 SrcSize - The size of source data
73 DstBuffer - The buffer to store the compressed data
74 DstSize - On input, the size of DstBuffer; On output,
75 the size of the actual compressed data.
76
77 Returns:
78
79 EFI_BUFFER_TOO_SMALL - The DstBuffer is too small. In this case,
80 DstSize contains the size needed.
81 EFI_SUCCESS - Compression is successful.
82 EFI_OUT_OF_RESOURCES - No resource to complete function.
83 EFI_INVALID_PARAMETER - Parameter supplied is wrong.
84
85 --*/
86 typedef
87 EFI_STATUS
88 (*COMPRESS_FUNCTION) (
89 IN UINT8 *SrcBuffer,
90 IN UINT32 SrcSize,
91 IN UINT8 *DstBuffer,
92 IN OUT UINT32 *DstSize
93 );
94
95 #endif