]> wimlib.net Git - wimlib/commitdiff
lzx_common: rename to lzx_preprocess/lzx_postprocess
authorEric Biggers <ebiggers3@gmail.com>
Sat, 19 Sep 2015 20:06:37 +0000 (15:06 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Sun, 27 Sep 2015 14:41:30 +0000 (09:41 -0500)
include/wimlib/lzx_common.h
src/lzx_common.c
src/lzx_compress.c
src/lzx_decompress.c

index 92e0b75b255c2bc2d55787d9f83102bf08eec97e..0b57530d7a49a2d21b24af4a1bafc6af0302d5fb 100644 (file)
@@ -21,9 +21,9 @@ extern unsigned
 lzx_get_num_main_syms(unsigned window_order);
 
 extern void
-lzx_do_e8_preprocessing(u8 *data, u32 size);
+lzx_preprocess(u8 *data, u32 size);
 
 extern void
-lzx_undo_e8_preprocessing(u8 *data, u32 size);
+lzx_postprocess(u8 *data, u32 size);
 
 #endif /* _LZX_COMMON_H */
index 6eab2031f24930187bbf3ef8b70fe76525be9d5c..0677e0a0d40693a37888c431b521771621ad60e1 100644 (file)
@@ -323,13 +323,13 @@ lzx_e8_filter(u8 *data, u32 size, void (*process_target)(void *, s32))
 }
 
 void
-lzx_do_e8_preprocessing(u8 *data, u32 size)
+lzx_preprocess(u8 *data, u32 size)
 {
        lzx_e8_filter(data, size, do_translate_target);
 }
 
 void
-lzx_undo_e8_preprocessing(u8 *data, u32 size)
+lzx_postprocess(u8 *data, u32 size)
 {
        lzx_e8_filter(data, size, undo_translate_target);
 }
index de89f596c1dc70fc63adac9e211541634a535757..f0edddd33aab3d706826b8db4f85fa7d07918133 100644 (file)
@@ -2338,7 +2338,7 @@ lzx_compress(const void *restrict in, size_t in_nbytes,
        else
                memcpy(c->in_buffer, in, in_nbytes);
        c->in_nbytes = in_nbytes;
-       lzx_do_e8_preprocessing(c->in_buffer, in_nbytes);
+       lzx_preprocess(c->in_buffer, in_nbytes);
 
        /* Initially, the previous Huffman codeword lengths are all zeroes.  */
        c->codes_index = 0;
@@ -2353,7 +2353,7 @@ lzx_compress(const void *restrict in, size_t in_nbytes,
        /* Flush the output bitstream and return the compressed size or 0.  */
        result = lzx_flush_output(&os);
        if (!result && c->destructive)
-               lzx_undo_e8_preprocessing(c->in_buffer, c->in_nbytes);
+               lzx_postprocess(c->in_buffer, c->in_nbytes);
        return result;
 }
 
index 687420a9a75d8c4e6042e32a13556e051c8dcbc8..9a030759192caa9e63a548c8af340474c953b733 100644 (file)
@@ -603,7 +603,7 @@ lzx_decompress(const void *restrict compressed_data, size_t compressed_size,
 
        /* Postprocess the data unless it cannot possibly contain 0xe8 bytes  */
        if (may_have_e8_byte)
-               lzx_undo_e8_preprocessing(uncompressed_data, uncompressed_size);
+               lzx_postprocess(uncompressed_data, uncompressed_size);
 
        return 0;
 }