]> git.proxmox.com Git - mirror_edk2.git/blame - BaseTools/Source/C/Common/Compress.h
BaseTools: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / BaseTools / Source / C / Common / Compress.h
CommitLineData
30fdf114 1/** @file\r
97fa0ee9
YL
2Header file for compression routine.\r
3Providing both EFI and Tiano Compress algorithms.\r
f7496d71
LG
4\r
5Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
2e351cbe 6SPDX-License-Identifier: BSD-2-Clause-Patent\r
f7496d71 7\r
30fdf114
LG
8**/\r
9\r
10#ifndef _COMPRESS_H_\r
11#define _COMPRESS_H_\r
12\r
13#include <string.h>\r
14#include <stdlib.h>\r
15\r
16#include "CommonLib.h"\r
17#include <Common/UefiBaseTypes.h>\r
18/*++\r
19\r
20Routine Description:\r
21\r
22 Tiano compression routine.\r
23\r
24--*/\r
25EFI_STATUS\r
26TianoCompress (\r
27 IN UINT8 *SrcBuffer,\r
28 IN UINT32 SrcSize,\r
29 IN UINT8 *DstBuffer,\r
30 IN OUT UINT32 *DstSize\r
31 )\r
32;\r
33\r
34/*++\r
35\r
36Routine Description:\r
37\r
38 Efi compression routine.\r
39\r
40--*/\r
41EFI_STATUS\r
42EfiCompress (\r
43 IN UINT8 *SrcBuffer,\r
44 IN UINT32 SrcSize,\r
45 IN UINT8 *DstBuffer,\r
46 IN OUT UINT32 *DstSize\r
47 )\r
48;\r
49\r
50/*++\r
51\r
52Routine Description:\r
53\r
54 The compression routine.\r
55\r
56Arguments:\r
57\r
58 SrcBuffer - The buffer storing the source data\r
59 SrcSize - The size of source data\r
60 DstBuffer - The buffer to store the compressed data\r
61 DstSize - On input, the size of DstBuffer; On output,\r
62 the size of the actual compressed data.\r
63\r
64Returns:\r
65\r
66 EFI_BUFFER_TOO_SMALL - The DstBuffer is too small. In this case,\r
67 DstSize contains the size needed.\r
68 EFI_SUCCESS - Compression is successful.\r
69 EFI_OUT_OF_RESOURCES - No resource to complete function.\r
70 EFI_INVALID_PARAMETER - Parameter supplied is wrong.\r
71\r
72--*/\r
73typedef\r
74EFI_STATUS\r
75(*COMPRESS_FUNCTION) (\r
76 IN UINT8 *SrcBuffer,\r
77 IN UINT32 SrcSize,\r
78 IN UINT8 *DstBuffer,\r
79 IN OUT UINT32 *DstSize\r
80 );\r
81\r
82#endif\r