]> wimlib.net Git - wimlib/blobdiff - src/compress_common.c
Use more comprehensive public domain dedications
[wimlib] / src / compress_common.c
index 7ca7f5bba312831b9d342af875acaf2c19f144a0..53f3d36f17b3ca607a3d2153adf4eaab1afdf836 100644 (file)
@@ -1,25 +1,32 @@
 /*
  * compress_common.c
  *
 /*
  * compress_common.c
  *
- * Code for compression shared among multiple compression formats.
+ * The following copying information applies to this specific source code file:
  *
  *
- * Author:  Eric Biggers
- * Year:    2012 - 2014
+ * Written in 2012-2014 by Eric Biggers <ebiggers3@gmail.com>
  *
  *
- * The author dedicates this file to the public domain.
- * You can do whatever you want with this file.
+ * To the extent possible under law, the author(s) have dedicated all copyright
+ * and related and neighboring rights to this software to the public domain
+ * worldwide via the Creative Commons Zero 1.0 Universal Public Domain
+ * Dedication (the "CC0").
+ *
+ * This software 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 CC0 for more details.
+ *
+ * You should have received a copy of the CC0 along with this software; if not
+ * see <http://creativecommons.org/publicdomain/zero/1.0/>.
  */
 
 #ifdef HAVE_CONFIG_H
 #  include "config.h"
 #endif
 
  */
 
 #ifdef HAVE_CONFIG_H
 #  include "config.h"
 #endif
 
-#include "wimlib/assert.h"
+#include <string.h>
+
 #include "wimlib/compress_common.h"
 #include "wimlib/util.h"
 
 #include "wimlib/compress_common.h"
 #include "wimlib/util.h"
 
-#include <string.h>
-
 /* Given the binary tree node A[subtree_idx] whose children already
  * satisfy the maxheap property, swap the node with its greater child
  * until it is greater than both its children, so that the maxheap
 /* Given the binary tree node A[subtree_idx] whose children already
  * satisfy the maxheap property, swap the node with its greater child
  * until it is greater than both its children, so that the maxheap
@@ -126,7 +133,7 @@ sort_symbols(unsigned num_syms, const u32 freqs[restrict],
         * Tests were done with building the codes for LZX.  Results may
         * vary for different compression algorithms...!  */
 
         * Tests were done with building the codes for LZX.  Results may
         * vary for different compression algorithms...!  */
 
-       num_counters = (DIV_ROUND_UP(num_syms, 4) + 3) & ~3;
+       num_counters = ALIGN(DIV_ROUND_UP(num_syms, 4), 4);
 
        unsigned counters[num_counters];
 
 
        unsigned counters[num_counters];