]>
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
23 #include <UefiBaseTypes.h>
26 SetCustomizedCompressionType (
33 The implementation of Customized SetCompressionType().
36 Type - The type if compression.
40 EFI_SUCCESS - The type has been set.
41 EFI_UNSUPPORTED - This type is unsupported.
46 return EFI_UNSUPPORTED
;
54 OUT UINT32
*ScratchSize
60 The implementation of Customized GetInfo().
63 Source - The source buffer containing the compressed data.
64 SrcSize - The size of source buffer
65 DstSize - The size of destination buffer.
66 ScratchSize - The size of scratch buffer.
70 EFI_SUCCESS - The size of destination buffer and the size of scratch buffer are successull retrieved.
71 EFI_INVALID_PARAMETER - The source data is corrupted
72 EFI_UNSUPPORTED - The operation is unsupported.
77 return EFI_UNSUPPORTED
;
81 CustomizedDecompress (
84 IN OUT VOID
*Destination
,
93 The implementation of Customized Decompress().
97 This - The protocol instance pointer
98 Source - The source buffer containing the compressed data.
99 SrcSize - The size of source buffer
100 Destination - The destination buffer to store the decompressed data
101 DstSize - The size of destination buffer.
102 Scratch - The buffer used internally by the decompress routine. This buffer is needed to store intermediate data.
103 ScratchSize - The size of scratch buffer.
107 EFI_SUCCESS - Decompression is successfull
108 EFI_INVALID_PARAMETER - The source data is corrupted
109 EFI_UNSUPPORTED - The operation is unsupported.
113 return EFI_UNSUPPORTED
;
121 IN OUT UINT32
*DstSize
127 The Customized compression routine.
131 SrcBuffer - The buffer storing the source data
132 SrcSize - The size of source data
133 DstBuffer - The buffer to store the compressed data
134 DstSize - On input, the size of DstBuffer; On output,
135 the size of the actual compressed data.
139 EFI_BUFFER_TOO_SMALL - The DstBuffer is too small. In this case,
140 DstSize contains the size needed.
141 EFI_SUCCESS - Compression is successful.
143 EFI_UNSUPPORTED - The operation is unsupported.
146 return EFI_UNSUPPORTED
;