]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Library/BaseCustomDecompressLibNull/BaseCustomDecompressLibNull.c
Update CustomDecompress library to support algorithm guid and Update DxeIpl and DxeCo...
[mirror_edk2.git] / MdePkg / Library / BaseCustomDecompressLibNull / BaseCustomDecompressLibNull.c
CommitLineData
bf231ea6
A
1/** @file\r
2 Null implementation of the custom decompress library\r
7bc232b2 3\r
bf231ea6
A
4 Copyright (c) 2006 - 2007, Intel Corporation.<BR>\r
5 All rights reserved. This program and the accompanying materials \r
6 are licensed and made available under the terms and conditions of the BSD License \r
7 which accompanies this distribution. The full text of the license may be found at \r
8 http://opensource.org/licenses/bsd-license.php \r
7bc232b2 9\r
bf231ea6
A
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
7bc232b2 12\r
bf231ea6 13**/\r
7bc232b2 14\r
859b72fa
A
15#include <Base.h>\r
16#include <Library/CustomDecompressLib.h>\r
17\r
7bc232b2 18\r
bf231ea6
A
19/**
20 The internal implementation of *_DECOMPRESS_PROTOCOL.GetInfo().\r
21
22 @param[in] Source The source buffer containing the compressed data.
23 @param[in] SourceSize The size of source buffer
24 @param[out] DestinationSize The size of destination buffer.
25 @param[out] ScratchSize The size of scratch buffer.
26
27 @retval RETURN_SUCCESS The size of destination buffer and the size of scratch buffer are successull retrieved.\r
28 @retval RETURN_INVALID_PARAMETER The source data is corrupted
29
30**/\r
7bc232b2
LG
31RETURN_STATUS\r
32EFIAPI\r
33CustomDecompressGetInfo (\r
d8c79a81 34 IN CONST GUID *DecompressGuid,\r
7bc232b2
LG
35 IN CONST VOID *Source,\r
36 IN UINT32 SourceSize,\r
37 OUT UINT32 *DestinationSize,\r
38 OUT UINT32 *ScratchSize\r
39 )\r
7bc232b2
LG
40{\r
41 return RETURN_UNSUPPORTED;\r
42}\r
43\r
bf231ea6
A
44\r
45/**
46 The internal implementation of *_DECOMPRESS_PROTOCOL.Decompress().\r
47
48 @param[in] Source The source buffer containing the compressed data.
49 @param[in] Destination The destination buffer to store the decompressed data
50 @param[out] Scratch The buffer used internally by the decompress routine. This buffer is needed to store intermediate data.\r
51
52
53 @retval RETURN_SUCCESS Decompression is successfull\r
54 @retval RETURN_INVALID_PARAMETER The source data is corrupted
55
56**/\r
7bc232b2
LG
57RETURN_STATUS\r
58EFIAPI\r
59CustomDecompress (\r
d8c79a81 60 IN const GUID *DecompressGuid,\r
7bc232b2
LG
61 IN CONST VOID *Source,\r
62 IN OUT VOID *Destination,\r
63 IN OUT VOID *Scratch\r
64 )\r
7bc232b2
LG
65{\r
66 return RETURN_UNSUPPORTED;\r
67}\r
d8c79a81
LG
68\r
69/**
70 Get decompress method guid list.\r
71\r
72 @param[in, out] AlgorithmGuidTable The decompress method guid list.
73 @param[in, out] NumberOfAlgorithms The number of decompress methods.
74
75 @retval RETURN_SUCCESS Get all algorithmes list successfully..
76**/\r
77RETURN_STATUS\r
78EFIAPI\r
79CustomDecompressGetAlgorithms (\r
80 IN OUT GUID **AlgorithmGuidTable,\r
81 IN OUT UINTN *NumberOfAlgorithms\r
82 )\r
83{\r
84 *NumberOfAlgorithms = 0;\r
85 return RETURN_SUCCESS; \r
86}\r