]> git.proxmox.com Git - mirror_edk2.git/blob - EdkCompatibilityPkg/Sample/Tools/Source/Common/Compress.h
Add in the 1st version of ECP.
[mirror_edk2.git] / EdkCompatibilityPkg / Sample / Tools / 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 /*++
27
28 Routine Description:
29
30 Tiano compression routine.
31
32 --*/
33 EFI_STATUS
34 TianoCompress (
35 IN UINT8 *SrcBuffer,
36 IN UINT32 SrcSize,
37 IN UINT8 *DstBuffer,
38 IN OUT UINT32 *DstSize
39 )
40 ;
41
42 /*++
43
44 Routine Description:
45
46 Efi compression routine.
47
48 --*/
49 EFI_STATUS
50 EfiCompress (
51 IN UINT8 *SrcBuffer,
52 IN UINT32 SrcSize,
53 IN UINT8 *DstBuffer,
54 IN OUT UINT32 *DstSize
55 )
56 ;
57
58 /*++
59
60 Routine Description:
61
62 The compression routine.
63
64 Arguments:
65
66 SrcBuffer - The buffer storing the source data
67 SrcSize - The size of source data
68 DstBuffer - The buffer to store the compressed data
69 DstSize - On input, the size of DstBuffer; On output,
70 the size of the actual compressed data.
71
72 Returns:
73
74 EFI_BUFFER_TOO_SMALL - The DstBuffer is too small. In this case,
75 DstSize contains the size needed.
76 EFI_SUCCESS - Compression is successful.
77 EFI_OUT_OF_RESOURCES - No resource to complete function.
78 EFI_INVALID_PARAMETER - Parameter supplied is wrong.
79
80 --*/
81 typedef
82 EFI_STATUS
83 (*COMPRESS_FUNCTION) (
84 IN UINT8 *SrcBuffer,
85 IN UINT32 SrcSize,
86 IN UINT8 *DstBuffer,
87 IN OUT UINT32 *DstSize
88 );
89
90 #endif