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