This sequence is further divided into Blocks and Huffman codings\r
are applied to each Block.\r
\r
- Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
\r
**/\r
#include <Uefi.h>\r
-#include <ShellBase.h>\r
#include <Library/MemoryAllocationLib.h>\r
#include <Library/BaseMemoryLib.h>\r
#include <Library/DebugLib.h>\r
#include <Library/ShellLib.h>\r
\r
+#include "Compress.h"\r
+\r
//\r
// Macro Definitions\r
//\r
\r
/**\r
Allocate memory spaces for data structures used in compression process.\r
- \r
+\r
@retval EFI_SUCCESS Memory was allocated successfully.\r
@retval EFI_OUT_OF_RESOURCES A memory allocation failed.\r
**/\r
\r
/**\r
Assign code to each symbol based on the code length array.\r
- \r
+\r
@param[in] LoopVar8 The number of symbols.\r
@param[in] Len The code length array.\r
@param[out] Code The stores codes for each symbol.\r
Code[LoopVar1] = Start[Len[LoopVar1]]++;\r
}\r
}\r
- \r
+\r
/**\r
Generates Huffman codes given a frequency distribution of symbols.\r
\r
/**\r
Outputs an Original Character or a Pointer.\r
\r
- @param[in] LoopVar5 The original character or the 'String Length' element of \r
+ @param[in] LoopVar5 The original character or the 'String Length' element of\r
a Pointer.\r
@param[in] LoopVar7 The 'Position' field of a Pointer.\r
**/\r
The compression routine.\r
\r
@param[in] SrcBuffer The buffer containing the source data.\r
- @param[in] SrcSize The number of bytes in SrcBuffer.\r
+ @param[in] SrcSize Number of bytes in SrcBuffer.\r
@param[in] DstBuffer The buffer to put the compressed image in.\r
@param[in, out] DstSize On input the size (in bytes) of DstBuffer, on\r
- return the number of bytes placed in DstBuffer.\r
+ return the number of bytes placed in DstBuffer.\r
\r
@retval EFI_SUCCESS The compression was sucessful.\r
@retval EFI_BUFFER_TOO_SMALL The buffer was too small. DstSize is required.\r
**/\r
EFI_STATUS\r
Compress (\r
- IN VOID *SrcBuffer,\r
- IN UINT64 SrcSize,\r
- IN VOID *DstBuffer,\r
- IN OUT UINT64 *DstSize\r
+ IN VOID *SrcBuffer,\r
+ IN UINT64 SrcSize,\r
+ IN VOID *DstBuffer,\r
+ IN OUT UINT64 *DstSize\r
)\r
{\r
EFI_STATUS Status;\r