]> git.proxmox.com Git - mirror_edk2.git/blame - EdkModulePkg/Library/EdkNullCustomizedDecompressLib/CustomizedDecompress.c
1. adjust contents layout of SPD header editor, FPD header editor.
[mirror_edk2.git] / EdkModulePkg / Library / EdkNullCustomizedDecompressLib / CustomizedDecompress.c
CommitLineData
878ddf1f 1/*++\r
2\r
3Copyright (c) 2006, Intel Corporation \r
4All rights reserved. This program and the accompanying materials \r
5are licensed and made available under the terms and conditions of the BSD License \r
6which accompanies this distribution. The full text of the license may be found at \r
7http://opensource.org/licenses/bsd-license.php \r
8 \r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
11\r
12Module Name:\r
13 \r
14 CustomizedDecompress.c\r
15\r
16Abstract:\r
17\r
18 Implementation file for Customized decompression routine\r
19 \r
20--*/\r
21\r
22#include <CustomizedDecompress.h>\r
23\r
24EFI_CUSTOMIZED_DECOMPRESS_PROTOCOL mCustomizedDecompress = {\r
25 CustomizedGetInfo,\r
26 CustomizedDecompress\r
27};\r
28\r
29EFI_CUSTOMIZED_DECOMPRESS_PROTOCOL *\r
30EFIAPI\r
31GetCustomizedDecompressProtocol (\r
32 VOID\r
33 )\r
34{\r
35 return &mCustomizedDecompress;\r
36}\r
37\r
38\r
39\r
40EFI_STATUS\r
41EFIAPI\r
42CustomizedGetInfo (\r
43 IN EFI_CUSTOMIZED_DECOMPRESS_PROTOCOL *This,\r
44 IN VOID *Source,\r
45 IN UINT32 SrcSize,\r
46 OUT UINT32 *DstSize,\r
47 OUT UINT32 *ScratchSize\r
48 )\r
49/*++\r
50\r
51Routine Description:\r
52\r
53 The implementation of Customized GetInfo().\r
54\r
55Arguments:\r
56 This - The EFI customized decompress protocol\r
57 Source - The source buffer containing the compressed data.\r
58 SrcSize - The size of source buffer\r
59 DstSize - The size of destination buffer.\r
60 ScratchSize - The size of scratch buffer.\r
61\r
62Returns:\r
63\r
64 EFI_SUCCESS - The size of destination buffer and the size of scratch buffer are successull retrieved.\r
65 EFI_INVALID_PARAMETER - The source data is corrupted\r
66 EFI_UNSUPPORTED - Not supported\r
67\r
68--*/\r
69{\r
70 return EFI_UNSUPPORTED;\r
71}\r
72\r
73EFI_STATUS\r
74EFIAPI\r
75CustomizedDecompress (\r
76 IN EFI_CUSTOMIZED_DECOMPRESS_PROTOCOL *This,\r
77 IN VOID *Source,\r
78 IN UINT32 SrcSize,\r
79 IN OUT VOID *Destination,\r
80 IN UINT32 DstSize,\r
81 IN OUT VOID *Scratch,\r
82 IN UINT32 ScratchSize\r
83 )\r
84/*++\r
85\r
86Routine Description:\r
87\r
88 The implementation of Customized Decompress().\r
89\r
90Arguments:\r
91\r
92 This - The protocol instance pointer\r
93 Source - The source buffer containing the compressed data.\r
94 SrcSize - The size of source buffer\r
95 Destination - The destination buffer to store the decompressed data\r
96 DstSize - The size of destination buffer.\r
97 Scratch - The buffer used internally by the decompress routine. This buffer is needed to store intermediate data.\r
98 ScratchSize - The size of scratch buffer.\r
99\r
100Returns:\r
101\r
102 EFI_SUCCESS - Decompression is successfull\r
103 EFI_INVALID_PARAMETER - The source data is corrupted\r
104 EFI_UNSUPPORTED - Not supported\r
105\r
106--*/\r
107{\r
108 return EFI_UNSUPPORTED;\r
109}\r