From a0651d04f742b00f92b3321dd81cd9abb2b39d9d Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Sat, 19 Sep 2015 15:06:37 -0500 Subject: [PATCH] lzx_common: rename to lzx_preprocess/lzx_postprocess --- include/wimlib/lzx_common.h | 4 ++-- src/lzx_common.c | 4 ++-- src/lzx_compress.c | 4 ++-- src/lzx_decompress.c | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/wimlib/lzx_common.h b/include/wimlib/lzx_common.h index 92e0b75b..0b57530d 100644 --- a/include/wimlib/lzx_common.h +++ b/include/wimlib/lzx_common.h @@ -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 */ diff --git a/src/lzx_common.c b/src/lzx_common.c index 6eab2031..0677e0a0 100644 --- a/src/lzx_common.c +++ b/src/lzx_common.c @@ -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); } diff --git a/src/lzx_compress.c b/src/lzx_compress.c index de89f596..f0edddd3 100644 --- a/src/lzx_compress.c +++ b/src/lzx_compress.c @@ -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; } diff --git a/src/lzx_decompress.c b/src/lzx_decompress.c index 687420a9..9a030759 100644 --- a/src/lzx_decompress.c +++ b/src/lzx_decompress.c @@ -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; } -- 2.43.0