• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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   CustomizedCompress.c
15 
16 Abstract:
17 
18   Header file for Customized compression routine
19 
20 --*/
21 
22 #include "TianoCommon.h"
23 
24 EFI_STATUS
SetCustomizedCompressionType(IN CHAR8 * Type)25 SetCustomizedCompressionType (
26   IN  CHAR8   *Type
27   )
28 /*++
29 
30 Routine Description:
31 
32 The implementation of Customized SetCompressionType().
33 
34 Arguments:
35   Type        - The type if compression.
36 
37 Returns:
38 
39   EFI_SUCCESS           - The type has been set.
40   EFI_UNSUPPORTED       - This type is unsupported.
41 
42 
43 --*/
44 {
45   return EFI_UNSUPPORTED;
46 }
47 
48 EFI_STATUS
CustomizedGetInfo(IN VOID * Source,IN UINT32 SrcSize,OUT UINT32 * DstSize,OUT UINT32 * ScratchSize)49 CustomizedGetInfo (
50   IN      VOID    *Source,
51   IN      UINT32  SrcSize,
52   OUT     UINT32  *DstSize,
53   OUT     UINT32  *ScratchSize
54   )
55 /*++
56 
57 Routine Description:
58 
59 The implementation of Customized GetInfo().
60 
61 Arguments:
62   Source      - The source buffer containing the compressed data.
63   SrcSize     - The size of source buffer
64   DstSize     - The size of destination buffer.
65   ScratchSize - The size of scratch buffer.
66 
67 Returns:
68 
69   EFI_SUCCESS           - The size of destination buffer and the size of scratch buffer are successfully retrieved.
70   EFI_INVALID_PARAMETER - The source data is corrupted
71   EFI_UNSUPPORTED       - The operation is unsupported.
72 
73 
74 --*/
75 {
76   return EFI_UNSUPPORTED;
77 }
78 
79 EFI_STATUS
CustomizedDecompress(IN VOID * Source,IN UINT32 SrcSize,IN OUT VOID * Destination,IN UINT32 DstSize,IN OUT VOID * Scratch,IN UINT32 ScratchSize)80 CustomizedDecompress (
81   IN      VOID    *Source,
82   IN      UINT32  SrcSize,
83   IN OUT  VOID    *Destination,
84   IN      UINT32  DstSize,
85   IN OUT  VOID    *Scratch,
86   IN      UINT32  ScratchSize
87   )
88 /*++
89 
90 Routine Description:
91 
92   The implementation of Customized Decompress().
93 
94 Arguments:
95 
96   This        - The protocol instance pointer
97   Source      - The source buffer containing the compressed data.
98   SrcSize     - The size of source buffer
99   Destination - The destination buffer to store the decompressed data
100   DstSize     - The size of destination buffer.
101   Scratch     - The buffer used internally by the decompress routine. This  buffer is needed to store intermediate data.
102   ScratchSize - The size of scratch buffer.
103 
104 Returns:
105 
106   EFI_SUCCESS           - Decompression is successfull
107   EFI_INVALID_PARAMETER - The source data is corrupted
108   EFI_UNSUPPORTED       - The operation is unsupported.
109 
110 --*/
111 {
112   return EFI_UNSUPPORTED;
113 }
114 
115 EFI_STATUS
CustomizedCompress(IN UINT8 * SrcBuffer,IN UINT32 SrcSize,IN UINT8 * DstBuffer,IN OUT UINT32 * DstSize)116 CustomizedCompress (
117   IN      UINT8   *SrcBuffer,
118   IN      UINT32  SrcSize,
119   IN      UINT8   *DstBuffer,
120   IN OUT  UINT32  *DstSize
121   )
122 /*++
123 
124 Routine Description:
125 
126   The Customized compression routine.
127 
128 Arguments:
129 
130   SrcBuffer   - The buffer storing the source data
131   SrcSize     - The size of source data
132   DstBuffer   - The buffer to store the compressed data
133   DstSize     - On input, the size of DstBuffer; On output,
134                 the size of the actual compressed data.
135 
136 Returns:
137 
138   EFI_BUFFER_TOO_SMALL  - The DstBuffer is too small. In this case,
139                 DstSize contains the size needed.
140   EFI_SUCCESS           - Compression is successful.
141 
142   EFI_UNSUPPORTED       - The operation is unsupported.
143 --*/
144 {
145   return EFI_UNSUPPORTED;
146 }
147