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