36086d4f0f005ec58953853586eab33a1304e81f
[mirror_edk2.git] / MdePkg / Include / Library / CustomDecompressLib.h
1 /** @file
2 Custom Decompress Functions
3
4 Copyright (c) 2006 - 2007, Intel Corporation
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
16 #ifndef __CUSTOM_DECPOMPRESS_LIB_H__
17 #define __CUSTOM_DECPOMPRESS_LIB_H__
18
19 /**
20 Decompress GetInfo fucntion.
21
22 @param[in] DecompressGuid The guid matches this decompress method.
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 /**
43 Decompress fucntion.
44
45 @param[in] DecompressGuid The guid matches this decompress method.
46 @param[in] Source The source buffer containing the compressed data.
47 @param[in] Destination The destination buffer to store the decompressed data
48 @param[out] Scratch The buffer used internally by the decompress routine. This buffer is needed to store intermediate data.
49
50 @retval RETURN_SUCCESS Decompression is successfull
51 @retval RETURN_INVALID_PARAMETER The source data is corrupted
52
53 **/
54 RETURN_STATUS
55 EFIAPI
56 CustomDecompress (
57 IN CONST GUID *DecompressGuid,
58 IN CONST VOID *Source,
59 IN OUT VOID *Destination,
60 IN OUT VOID *Scratch
61 );
62
63 /**
64 Get decompress method guid list.
65
66 @param[in, out] AlgorithmGuidTable The decompress method guid list.
67 @param[in, out] NumberOfAlgorithms The number of decompress methods.
68
69 @retval RETURN_SUCCESS Get all algorithmes list successfully..
70 **/
71 RETURN_STATUS
72 EFIAPI
73 CustomDecompressGetAlgorithms (
74 IN OUT GUID **AlgorithmGuidTable,
75 IN OUT UINTN *NumberOfAlgorithms
76 );
77
78 #endif