AJFISH | bf231ea | 2007-07-13 03:21:40 +0000 | [diff] [blame] | 1 | /** @file
|
| 2 | Null implementation of the custom decompress library
|
lgao4 | 7bc232b | 2007-07-03 09:57:29 +0000 | [diff] [blame] | 3 |
|
AJFISH | bf231ea | 2007-07-13 03:21:40 +0000 | [diff] [blame] | 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
|
lgao4 | 7bc232b | 2007-07-03 09:57:29 +0000 | [diff] [blame] | 9 |
|
AJFISH | bf231ea | 2007-07-13 03:21:40 +0000 | [diff] [blame] | 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.
|
lgao4 | 7bc232b | 2007-07-03 09:57:29 +0000 | [diff] [blame] | 12 |
|
AJFISH | bf231ea | 2007-07-13 03:21:40 +0000 | [diff] [blame] | 13 | **/
|
lgao4 | 7bc232b | 2007-07-03 09:57:29 +0000 | [diff] [blame] | 14 |
|
AJFISH | 859b72f | 2007-07-10 16:13:56 +0000 | [diff] [blame] | 15 | #include <Base.h>
|
| 16 | #include <Library/CustomDecompressLib.h>
|
| 17 |
|
lgao4 | 7bc232b | 2007-07-03 09:57:29 +0000 | [diff] [blame] | 18 |
|
AJFISH | bf231ea | 2007-07-13 03:21:40 +0000 | [diff] [blame] | 19 | /** |
| 20 | The internal implementation of *_DECOMPRESS_PROTOCOL.GetInfo().
|
| 21 | |
| 22 | @param[in] Source The source buffer containing the compressed data. |
| 23 | @param[in] SourceSize The size of source buffer |
| 24 | @param[out] DestinationSize The size of destination buffer. |
| 25 | @param[out] ScratchSize The size of scratch buffer. |
| 26 | |
| 27 | @retval RETURN_SUCCESS The size of destination buffer and the size of scratch buffer are successull retrieved.
|
| 28 | @retval RETURN_INVALID_PARAMETER The source data is corrupted |
| 29 | |
| 30 | **/
|
lgao4 | 7bc232b | 2007-07-03 09:57:29 +0000 | [diff] [blame] | 31 | RETURN_STATUS
|
| 32 | EFIAPI
|
| 33 | CustomDecompressGetInfo (
|
lgao4 | d8c79a8 | 2007-08-08 10:17:57 +0000 | [diff] [blame] | 34 | IN CONST GUID *DecompressGuid,
|
lgao4 | 7bc232b | 2007-07-03 09:57:29 +0000 | [diff] [blame] | 35 | IN CONST VOID *Source,
|
| 36 | IN UINT32 SourceSize,
|
| 37 | OUT UINT32 *DestinationSize,
|
| 38 | OUT UINT32 *ScratchSize
|
| 39 | )
|
lgao4 | 7bc232b | 2007-07-03 09:57:29 +0000 | [diff] [blame] | 40 | {
|
| 41 | return RETURN_UNSUPPORTED;
|
| 42 | }
|
| 43 |
|
AJFISH | bf231ea | 2007-07-13 03:21:40 +0000 | [diff] [blame] | 44 |
|
| 45 | /** |
| 46 | The internal implementation of *_DECOMPRESS_PROTOCOL.Decompress().
|
| 47 | |
| 48 | @param[in] Source The source buffer containing the compressed data. |
| 49 | @param[in] Destination The destination buffer to store the decompressed data |
| 50 | @param[out] Scratch The buffer used internally by the decompress routine. This buffer is needed to store intermediate data.
|
| 51 | |
| 52 | |
| 53 | @retval RETURN_SUCCESS Decompression is successfull
|
| 54 | @retval RETURN_INVALID_PARAMETER The source data is corrupted |
| 55 | |
| 56 | **/
|
lgao4 | 7bc232b | 2007-07-03 09:57:29 +0000 | [diff] [blame] | 57 | RETURN_STATUS
|
| 58 | EFIAPI
|
| 59 | CustomDecompress (
|
lgao4 | d35be2a | 2007-08-14 07:58:32 +0000 | [diff] [blame^] | 60 | IN CONST GUID *DecompressGuid,
|
lgao4 | 7bc232b | 2007-07-03 09:57:29 +0000 | [diff] [blame] | 61 | IN CONST VOID *Source,
|
| 62 | IN OUT VOID *Destination,
|
| 63 | IN OUT VOID *Scratch
|
| 64 | )
|
lgao4 | 7bc232b | 2007-07-03 09:57:29 +0000 | [diff] [blame] | 65 | {
|
| 66 | return RETURN_UNSUPPORTED;
|
| 67 | }
|
lgao4 | d8c79a8 | 2007-08-08 10:17:57 +0000 | [diff] [blame] | 68 |
|
| 69 | /** |
| 70 | Get decompress method guid list.
|
| 71 |
|
| 72 | @param[in, out] AlgorithmGuidTable The decompress method guid list. |
| 73 | @param[in, out] NumberOfAlgorithms The number of decompress methods. |
| 74 | |
| 75 | @retval RETURN_SUCCESS Get all algorithmes list successfully.. |
| 76 | **/
|
| 77 | RETURN_STATUS
|
| 78 | EFIAPI
|
| 79 | CustomDecompressGetAlgorithms (
|
lgao4 | 98a1fa1 | 2007-08-08 15:21:11 +0000 | [diff] [blame] | 80 | IN OUT GUID **AlgorithmGuidTable,
|
| 81 | IN OUT UINT32 *NumberOfAlgorithms
|
lgao4 | d8c79a8 | 2007-08-08 10:17:57 +0000 | [diff] [blame] | 82 | )
|
| 83 | {
|
lgao4 | d35be2a | 2007-08-14 07:58:32 +0000 | [diff] [blame^] | 84 | ASSERT (NumberOfAlgorithms != NULL);
|
| 85 |
|
lgao4 | d8c79a8 | 2007-08-08 10:17:57 +0000 | [diff] [blame] | 86 | *NumberOfAlgorithms = 0;
|
| 87 | return RETURN_SUCCESS;
|
| 88 | }
|