X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=src%2Flzx-comp.c;h=cde37ab5ca77558cf181dacd151f83a84c42c0d4;hp=0f120791c67fd231073e3a85a6a3672a02efe3a2;hb=60b8f54df8fed44136bdc8ec615ee62703d87b69;hpb=53d4db68e30bf45b983c59f91e5e2a3e039e1426 diff --git a/src/lzx-comp.c b/src/lzx-comp.c index 0f120791..cde37ab5 100644 --- a/src/lzx-comp.c +++ b/src/lzx-comp.c @@ -14,16 +14,16 @@ * This file is part of wimlib, a library for working with WIM files. * * 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) + * terms of the GNU General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at your option) * any later version. * * 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 + * A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * - * You should have received a copy of the GNU Lesser General Public License + * You should have received a copy of the GNU General Public License * along with wimlib; if not, see http://www.gnu.org/licenses/. */ @@ -639,7 +639,7 @@ int lzx_compress(const void *__uncompressed_data, uint uncompressed_len, uint i; int ret; - LZX_DEBUG("uncompressed_len = %u\n", uncompressed_len); + LZX_DEBUG("uncompressed_len = %u", uncompressed_len); if (uncompressed_len < 100) return 1; @@ -667,8 +667,7 @@ int lzx_compress(const void *__uncompressed_data, uint uncompressed_len, &queue, freq_tabs.main_freq_table, &lzx_lz_params); - LZX_DEBUG("using %u matches\n", num_matches); - + LZX_DEBUG("using %u matches", num_matches); lzx_make_huffman_codes(&freq_tabs, &codes); @@ -729,31 +728,31 @@ int lzx_compress(const void *__uncompressed_data, uint uncompressed_len, compressed_len = ostream.bit_output - (u8*)compressed_data; - LZX_DEBUG("Compressed %u => %u bytes\n", - uncompressed_len, compressed_len); + LZX_DEBUG("Compressed %u => %u bytes", + uncompressed_len, compressed_len); *compressed_len_ret = compressed_len; #ifdef ENABLE_VERIFY_COMPRESSION /* Verify that we really get the same thing back when decompressing. */ + LZX_DEBUG("Verifying the compressed data."); u8 buf[uncompressed_len]; ret = lzx_decompress(compressed_data, compressed_len, buf, uncompressed_len); if (ret != 0) { - ERROR("ERROR: Failed to decompress data we compressed!\n"); - exit(0); + ERROR("lzx_compress(): Failed to decompress data we compressed"); abort(); } for (i = 0; i < uncompressed_len; i++) { if (buf[i] != *((u8*)__uncompressed_data + i)) { - ERROR("Data we compressed didn't decompress to " - "the original data (difference at byte %u of " - "%u)\n", i + 1, uncompressed_len); + ERROR("lzx_compress(): Data we compressed didn't " + "decompress to the original data (difference at " + "byte %u of %u)", i + 1, uncompressed_len); abort(); } } - LZX_DEBUG("Compression verified to be correct.\n"); + LZX_DEBUG("Compression verified to be correct."); #endif return 0;