]> git.proxmox.com Git - mirror_edk2.git/blame - BaseTools/Source/C/Common/Compress.h
Sync EDKII BaseTools to BaseTools project r1971
[mirror_edk2.git] / BaseTools / Source / C / Common / Compress.h
CommitLineData
30fdf114
LG
1/** @file\r
2\r
40d841f6
LG
3Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>\r
4This program and the accompanying materials \r
30fdf114
LG
5are licensed and made available under the terms and conditions of the BSD License \r
6which accompanies this distribution. The full text of the license may be found at \r
7http://opensource.org/licenses/bsd-license.php \r
8 \r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
11\r
12Module Name:\r
13\r
14 Compress.h\r
15\r
16Abstract:\r
17\r
18 Header file for compression routine.\r
19 Providing both EFI and Tiano Compress algorithms.\r
20 \r
21**/\r
22\r
23#ifndef _COMPRESS_H_\r
24#define _COMPRESS_H_\r
25\r
26#include <string.h>\r
27#include <stdlib.h>\r
28\r
29#include "CommonLib.h"\r
30#include <Common/UefiBaseTypes.h>\r
31/*++\r
32\r
33Routine Description:\r
34\r
35 Tiano compression routine.\r
36\r
37--*/\r
38EFI_STATUS\r
39TianoCompress (\r
40 IN UINT8 *SrcBuffer,\r
41 IN UINT32 SrcSize,\r
42 IN UINT8 *DstBuffer,\r
43 IN OUT UINT32 *DstSize\r
44 )\r
45;\r
46\r
47/*++\r
48\r
49Routine Description:\r
50\r
51 Efi compression routine.\r
52\r
53--*/\r
54EFI_STATUS\r
55EfiCompress (\r
56 IN UINT8 *SrcBuffer,\r
57 IN UINT32 SrcSize,\r
58 IN UINT8 *DstBuffer,\r
59 IN OUT UINT32 *DstSize\r
60 )\r
61;\r
62\r
63/*++\r
64\r
65Routine Description:\r
66\r
67 The compression routine.\r
68\r
69Arguments:\r
70\r
71 SrcBuffer - The buffer storing the source data\r
72 SrcSize - The size of source data\r
73 DstBuffer - The buffer to store the compressed data\r
74 DstSize - On input, the size of DstBuffer; On output,\r
75 the size of the actual compressed data.\r
76\r
77Returns:\r
78\r
79 EFI_BUFFER_TOO_SMALL - The DstBuffer is too small. In this case,\r
80 DstSize contains the size needed.\r
81 EFI_SUCCESS - Compression is successful.\r
82 EFI_OUT_OF_RESOURCES - No resource to complete function.\r
83 EFI_INVALID_PARAMETER - Parameter supplied is wrong.\r
84\r
85--*/\r
86typedef\r
87EFI_STATUS\r
88(*COMPRESS_FUNCTION) (\r
89 IN UINT8 *SrcBuffer,\r
90 IN UINT32 SrcSize,\r
91 IN UINT8 *DstBuffer,\r
92 IN OUT UINT32 *DstSize\r
93 );\r
94\r
95#endif\r