1 /*++
2 
3 Copyright (c) 2004, Intel Corporation. All rights reserved.<BR>
4 This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution.  The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8 
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 
12 Module Name:
13 
14   EfiCustomizedCompress.h
15 
16 Abstract:
17 
18   Header file for Customized compression routine
19 
20 --*/
21 
22 #ifndef _EFICUSTOMIZEDCOMPRESS_H
23 #define _EFICUSTOMIZEDCOMPRESS_H
24 EFI_STATUS
25 SetCustomizedCompressionType (
26   IN  CHAR8   *Type
27   );
28 
29 /*++
30 
31 Routine Description:
32 
33 The implementation of Customized SetCompressionType().
34 
35 Arguments:
36   Type        - The type if compression.
37 
38 Returns:
39 
40   EFI_SUCCESS           - The type has been set.
41   EFI_UNSUPPORTED       - This type is unsupported.
42 
43 
44 --*/
45 EFI_STATUS
46 CustomizedGetInfo (
47   IN      VOID    *Source,
48   IN      UINT32  SrcSize,
49   OUT     UINT32  *DstSize,
50   OUT     UINT32  *ScratchSize
51   );
52 
53 /*++
54 
55 Routine Description:
56 
57   The implementation of Customized GetInfo().
58 
59 Arguments:
60 
61   Source      - The source buffer containing the compressed data.
62   SrcSize     - The size of source buffer
63   DstSize     - The size of destination buffer.
64   ScratchSize - The size of scratch buffer.
65 
66 Returns:
67 
68   EFI_SUCCESS           - The size of destination buffer and the size of scratch buffer are successull retrieved.
69   EFI_INVALID_PARAMETER - The source data is corrupted
70 
71 --*/
72 EFI_STATUS
73 CustomizedDecompress (
74   IN      VOID    *Source,
75   IN      UINT32  SrcSize,
76   IN OUT  VOID    *Destination,
77   IN      UINT32  DstSize,
78   IN OUT  VOID    *Scratch,
79   IN      UINT32  ScratchSize
80   );
81 
82 /*++
83 
84 Routine Description:
85 
86   The implementation of Customized Decompress().
87 
88 Arguments:
89 
90   This        - The protocol instance pointer
91   Source      - The source buffer containing the compressed data.
92   SrcSize     - The size of source buffer
93   Destination - The destination buffer to store the decompressed data
94   DstSize     - The size of destination buffer.
95   Scratch     - The buffer used internally by the decompress routine. This  buffer is needed to store intermediate data.
96   ScratchSize - The size of scratch buffer.
97 
98 Returns:
99 
100   EFI_SUCCESS           - Decompression is successfull
101   EFI_INVALID_PARAMETER - The source data is corrupted
102 
103 --*/
104 EFI_STATUS
105 CustomizedCompress (
106   IN      UINT8   *SrcBuffer,
107   IN      UINT32  SrcSize,
108   IN      UINT8   *DstBuffer,
109   IN OUT  UINT32  *DstSize
110   );
111 
112 /*++
113 
114 Routine Description:
115 
116   The Customized compression routine.
117 
118 Arguments:
119 
120   SrcBuffer   - The buffer storing the source data
121   SrcSize     - The size of source data
122   DstBuffer   - The buffer to store the compressed data
123   DstSize     - On input, the size of DstBuffer; On output,
124                 the size of the actual compressed data.
125 
126 Returns:
127 
128   EFI_BUFFER_TOO_SMALL  - The DstBuffer is too small. In this case,
129                           DstSize contains the size needed.
130   EFI_SUCCESS           - Compression is successful.
131 
132 --*/
133 
134 #endif
135