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