1 /*++ 2 3 Copyright (c) 2004 - 2006, Intel Corporation. All rights reserved.<BR> 4 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 8 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. 11 12 Module Name: 13 14 Compress.h 15 16 Abstract: 17 18 Header file for compression routine. 19 Providing both EFI and Tiano Compress algorithms. 20 21 --*/ 22 23 #ifndef _COMPRESS_H_ 24 #define _COMPRESS_H_ 25 26 /*++ 27 28 Routine Description: 29 30 Tiano compression routine. 31 32 --*/ 33 EFI_STATUS 34 TianoCompress ( 35 IN UINT8 *SrcBuffer, 36 IN UINT32 SrcSize, 37 IN UINT8 *DstBuffer, 38 IN OUT UINT32 *DstSize 39 ); 40 41 /*++ 42 43 Routine Description: 44 45 Efi compression routine. 46 47 --*/ 48 EFI_STATUS 49 EfiCompress ( 50 IN UINT8 *SrcBuffer, 51 IN UINT32 SrcSize, 52 IN UINT8 *DstBuffer, 53 IN OUT UINT32 *DstSize 54 ); 55 56 /*++ 57 58 Routine Description: 59 60 The compression routine. 61 62 Arguments: 63 64 SrcBuffer - The buffer storing the source data 65 SrcSize - The size of source data 66 DstBuffer - The buffer to store the compressed data 67 DstSize - On input, the size of DstBuffer; On output, 68 the size of the actual compressed data. 69 70 Returns: 71 72 EFI_BUFFER_TOO_SMALL - The DstBuffer is too small. In this case, 73 DstSize contains the size needed. 74 EFI_SUCCESS - Compression is successful. 75 EFI_OUT_OF_RESOURCES - No resource to complete function. 76 EFI_INVALID_PARAMETER - Parameter supplied is wrong. 77 78 --*/ 79 typedef 80 EFI_STATUS 81 (*COMPRESS_FUNCTION) ( 82 IN UINT8 *SrcBuffer, 83 IN UINT32 SrcSize, 84 IN UINT8 *DstBuffer, 85 IN OUT UINT32 *DstSize 86 ); 87 88 #endif 89