]> wimlib.net Git - wimlib/blobdiff - src/lz.c
NTFS apply updates
[wimlib] / src / lz.c
index ee3a8c7dc47ea3191b8ba6c5d8058415b9555d98..f079fc8e8c676880f7f9c81f9f4b19ff6e2b3f83 100644 (file)
--- a/src/lz.c
+++ b/src/lz.c
@@ -4,24 +4,26 @@
  * This file provides the code to analyze a buffer of uncompressed data for
  * matches, as per the LZ77 algorithm.  It uses a hash table to accelerate the
  * process.  This is based on code from zlib (v. 1.2.5).
- *
+ */
+
+/*
  * Copyright (C) 2012 Eric Biggers
  * Copyright (C) 1995-2010 Jean-loup Gailly and Mark Adler
  *
- * wimlib - Library for working with WIM files 
+ * This file is part of wimlib, a library for working with WIM files.
  *
- * This library is free software; you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option) any
- * later version.
+ * wimlib is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
  *
- * This library is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * wimlib is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+ * A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+ * details.
  *
- * You should have received a copy of the GNU Lesser General Public License along
- * with this library; if not, write to the Free Software Foundation, Inc., 59
- * Temple Place, Suite 330, Boston, MA 02111-1307 USA 
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with wimlib; if not, see http://www.gnu.org/licenses/.
  */
 
 #include "comp.h"
@@ -60,8 +62,7 @@ static inline uint update_hash(uint hash, u8 c)
  * indicating the end of the hash chain.
  */
 static inline uint insert_string(u16 hash_tab[], u16 prev_tab[], 
-                               const u8 window[], uint str_pos, 
-                                                       uint hash)
+                                const u8 window[], uint str_pos, uint hash)
 {
        hash = update_hash(hash, window[str_pos + 2]);
        prev_tab[str_pos] = hash_tab[hash];
@@ -204,10 +205,10 @@ static uint longest_match(const u8 window[], uint bytes_remaining,
  * intermediate representation of a match or literal byte.
  */
 uint lz_analyze_block(const u8 uncompressed_data[], uint uncompressed_len,
-                       u32 match_tab[], lz_record_match_t record_match,
-                       lz_record_literal_t record_literal, void *record_match_arg1,
-                       void *record_match_arg2, void *record_literal_arg,
-                       const struct lz_params *params)
+                     u32 match_tab[], lz_record_match_t record_match,
+                     lz_record_literal_t record_literal, void *record_match_arg1,
+                     void *record_match_arg2, void *record_literal_arg,
+                     const struct lz_params *params)
 {
        uint cur_match_pos = 0;
        uint cur_input_pos = 0;