]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/C/Common/TianoCompress.c
BaseTools: Clean up source files
[mirror_edk2.git] / BaseTools / Source / C / Common / TianoCompress.c
index 252b8291ed4badb7ac1e7a7aa5a275fbd214a724..8b1ea7f7614061ebadd9debba2b078ee9763328f 100644 (file)
@@ -1,17 +1,17 @@
 /** @file\r
-Compression routine. The compression algorithm is a mixture of LZ77 and Huffman \r
-coding. LZ77 transforms the source data into a sequence of Original Characters \r
-and Pointers to repeated strings. This sequence is further divided into Blocks \r
+Compression routine. The compression algorithm is a mixture of LZ77 and Huffman\r
+coding. LZ77 transforms the source data into a sequence of Original Characters\r
+and Pointers to repeated strings. This sequence is further divided into Blocks\r
 and Huffman codings are applied to each Block.\r
-  \r
-Copyright (c) 2006 - 2016, 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
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+\r
+Copyright (c) 2006 - 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
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
@@ -367,13 +367,13 @@ PutDword (
 Routine Description:\r
 \r
   Put a dword to output stream\r
-  \r
+\r
 Arguments:\r
 \r
   Data    - the dword to put\r
-  \r
+\r
 Returns: (VOID)\r
-  \r
+\r
 --*/\r
 {\r
   if (mDst < mDstUpperLimit) {\r
@@ -403,8 +403,8 @@ AllocateMemory (
 Routine Description:\r
 \r
   Allocate memory spaces for data structures used in compression process\r
-  \r
-Argements: \r
+\r
+Argements:\r
   VOID\r
 \r
 Returns:\r
@@ -460,7 +460,7 @@ FreeMemory (
 Routine Description:\r
 \r
   Called when compression is completed to free memory previously allocated.\r
-  \r
+\r
 Arguments: (VOID)\r
 \r
 Returns: (VOID)\r
@@ -512,7 +512,7 @@ InitSlide (
 Routine Description:\r
 \r
   Initialize String Info Log data structures\r
-  \r
+\r
 Arguments: (VOID)\r
 \r
 Returns: (VOID)\r
@@ -552,16 +552,16 @@ Child (
 Routine Description:\r
 \r
   Find child node given the parent node and the edge character\r
-  \r
+\r
 Arguments:\r
 \r
   NodeQ       - the parent node\r
   CharC       - the edge character\r
-  \r
+\r
 Returns:\r
 \r
-  The child node (NIL if not found)  \r
-  \r
+  The child node (NIL if not found)\r
+\r
 --*/\r
 {\r
   NODE  NodeR;\r
@@ -590,13 +590,13 @@ MakeChild (
 Routine Description:\r
 \r
   Create a new child for a given parent node.\r
-  \r
+\r
 Arguments:\r
 \r
   Parent       - the parent node\r
   CharC   - the edge character\r
   Child       - the child node\r
-  \r
+\r
 Returns: (VOID)\r
 \r
 --*/\r
@@ -624,11 +624,11 @@ Split (
 Routine Description:\r
 \r
   Split a node.\r
-  \r
+\r
 Arguments:\r
 \r
   Old     - the node to split\r
-  \r
+\r
 Returns: (VOID)\r
 \r
 --*/\r
@@ -662,7 +662,7 @@ InsertNode (
 Routine Description:\r
 \r
   Insert string info for current position into the String Info Log\r
-  \r
+\r
 Arguments: (VOID)\r
 \r
 Returns: (VOID)\r
@@ -795,7 +795,7 @@ Routine Description:
 \r
   Delete outdated string info. (The Usage of PERC_FLAG\r
   ensures a clean deletion)\r
-  \r
+\r
 Arguments: (VOID)\r
 \r
 Returns: (VOID)\r
@@ -926,7 +926,7 @@ Routine Description:
 Arguments: (VOID)\r
 \r
 Returns:\r
-  \r
+\r
   EFI_SUCCESS           - The compression is successful\r
   EFI_OUT_0F_RESOURCES  - Not enough memory for compression process\r
 \r
@@ -1012,7 +1012,7 @@ CountTFreq (
 Routine Description:\r
 \r
   Count the frequencies for the Extra Set\r
-  \r
+\r
 Arguments: (VOID)\r
 \r
 Returns: (VOID)\r
@@ -1071,13 +1071,13 @@ WritePTLen (
 Routine Description:\r
 \r
   Outputs the code length array for the Extra Set or the Position Set.\r
-  \r
+\r
 Arguments:\r
 \r
   Number       - the number of symbols\r
   nbit    - the number of bits needed to represent 'n'\r
   Special - the special symbol that needs to be take care of\r
-  \r
+\r
 Returns: (VOID)\r
 \r
 --*/\r
@@ -1119,7 +1119,7 @@ WriteCLen (
 Routine Description:\r
 \r
   Outputs the code length array for Char&Length Set\r
-  \r
+\r
 Arguments: (VOID)\r
 \r
 Returns: (VOID)\r
@@ -1209,11 +1209,11 @@ SendBlock (
 Routine Description:\r
 \r
   Huffman code the block and output it.\r
-  \r
-Arguments: \r
+\r
+Arguments:\r
   (VOID)\r
 \r
-Returns: \r
+Returns:\r
   (VOID)\r
 \r
 --*/\r
@@ -1420,7 +1420,7 @@ Routine Description:
 Arguments:\r
 \r
   Number   - the rightmost n bits of the data is used\r
-  x   - the data \r
+  x   - the data\r
 \r
 Returns: (VOID)\r
 \r
@@ -1456,7 +1456,7 @@ FreadCrc (
 Routine Description:\r
 \r
   Read in source data\r
-  \r
+\r
 Arguments:\r
 \r
   Pointer   - the buffer to hold the data\r
@@ -1465,7 +1465,7 @@ Arguments:
 Returns:\r
 \r
   number of bytes actually read\r
-  \r
+\r
 --*/\r
 {\r
   INT32 Index;\r
@@ -1507,11 +1507,11 @@ CountLen (
 Routine Description:\r
 \r
   Count the number of each code length for a Huffman tree.\r
-  \r
+\r
 Arguments:\r
 \r
   Index   - the top node\r
-  \r
+\r
 Returns: (VOID)\r
 \r
 --*/\r
@@ -1538,11 +1538,11 @@ MakeLen (
 Routine Description:\r
 \r
   Create code length array for a Huffman tree\r
-  \r
+\r
 Arguments:\r
 \r
   Root   - the root of the tree\r
-  \r
+\r
 Returns:\r
 \r
   VOID\r
@@ -1634,7 +1634,7 @@ MakeCode (
 Routine Description:\r
 \r
   Assign code to each symbol based on the code length array\r
-  \r
+\r
 Arguments:\r
 \r
   Number     - number of symbols\r
@@ -1671,18 +1671,18 @@ MakeTree (
 Routine Description:\r
 \r
   Generates Huffman codes given a frequency distribution of symbols\r
-  \r
+\r
 Arguments:\r
 \r
   NParm    - number of symbols\r
   FreqParm - frequency of each symbol\r
   LenParm  - code length for each symbol\r
   CodeParm - code for each symbol\r
-  \r
+\r
 Returns:\r
 \r
   Root of the Huffman tree.\r
-  \r
+\r
 --*/\r
 {\r
   INT32 Index;\r