]>
Commit | Line | Data |
---|---|---|
30fdf114 LG |
1 | /** @file\r |
2 | \r | |
40d841f6 LG |
3 | Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>\r |
4 | This program and the accompanying materials \r | |
30fdf114 LG |
5 | are licensed and made available under the terms and conditions of the BSD License \r |
6 | which accompanies this distribution. The full text of the license may be found at \r | |
7 | http://opensource.org/licenses/bsd-license.php \r | |
8 | \r | |
9 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r | |
10 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r | |
11 | \r | |
12 | Module Name:\r | |
13 | \r | |
14 | Compress.h\r | |
15 | \r | |
16 | Abstract:\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 | |
33 | Routine Description:\r | |
34 | \r | |
35 | Tiano compression routine.\r | |
36 | \r | |
37 | --*/\r | |
38 | EFI_STATUS\r | |
39 | TianoCompress (\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 | |
49 | Routine Description:\r | |
50 | \r | |
51 | Efi compression routine.\r | |
52 | \r | |
53 | --*/\r | |
54 | EFI_STATUS\r | |
55 | EfiCompress (\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 | |
65 | Routine Description:\r | |
66 | \r | |
67 | The compression routine.\r | |
68 | \r | |
69 | Arguments:\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 | |
77 | Returns:\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 | |
86 | typedef\r | |
87 | EFI_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 |