]>
git.proxmox.com Git - mirror_edk2.git/blob - Tools/Source/TianoTools/CustomizedCompress/CustomizedCompress.c
3 Copyright (c) 2004, Intel Corporation
4 All rights reserved. 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
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.
18 Header file for Customized compression routine
22 #include <Common/UefiBaseTypes.h>
25 SetCustomizedCompressionType (
32 The implementation of Customized SetCompressionType().
35 Type - The type if compression.
39 EFI_SUCCESS - The type has been set.
40 EFI_UNSUPPORTED - This type is unsupported.
45 return EFI_UNSUPPORTED
;
53 OUT UINT32
*ScratchSize
59 The implementation of Customized GetInfo().
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.
69 EFI_SUCCESS - The size of destination buffer and the size of scratch buffer are successull retrieved.
70 EFI_INVALID_PARAMETER - The source data is corrupted
71 EFI_UNSUPPORTED - The operation is unsupported.
76 return EFI_UNSUPPORTED
;
80 CustomizedDecompress (
83 IN OUT VOID
*Destination
,
92 The implementation of Customized Decompress().
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.
106 EFI_SUCCESS - Decompression is successfull
107 EFI_INVALID_PARAMETER - The source data is corrupted
108 EFI_UNSUPPORTED - The operation is unsupported.
112 return EFI_UNSUPPORTED
;
120 IN OUT UINT32
*DstSize
126 The Customized compression routine.
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.
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.
142 EFI_UNSUPPORTED - The operation is unsupported.
145 return EFI_UNSUPPORTED
;