diff --git a/CHANGELOG.md b/CHANGELOG.md index 8086f457..d732d894 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ full changelog at: https://github.com/sisong/HDiffPatch/commits ## [v4.8.0](https://github.com/sisong/HDiffPatch/tree/v4.8.0) - 2024-07-25 ### Added * cmdline hdiffz support option "-c-ldef-{1..12}", used libdeflate compressor; compatible with -c-zlib, faster or better than zlib; -* hpatchz added libdeflate decompressor, for optimized patch speed when diffFile is compressed by -c-zlib or -c-ldef; (default opened on PC, closed on mobile) + (hpatchz now default closed libdeflate decompressor) * add plugin ldefCompressPlugin, pldefCompressPlugin, ldefDecompressPlugin; ### Changed * released Android libhpatchz.so support Android 15 with 16KB page size; diff --git a/decompress_plugin_demo.h b/decompress_plugin_demo.h index 8f6603a0..ded23328 100644 --- a/decompress_plugin_demo.h +++ b/decompress_plugin_demo.h @@ -29,7 +29,7 @@ #define HPatch_decompress_plugin_demo_h //decompress plugin demo: // zlibDecompressPlugin; // support all deflate encoding by zlib -// ldefDecompressPlugin; // NOTE: not yet fully compatible with deflate encoding, now only support (p)ldefCompressPlugin +// ldefDecompressPlugin; // optimized deompress speed for deflate encoding // bz2DecompressPlugin; // lzmaDecompressPlugin; // lzma2DecompressPlugin; diff --git a/hdiffz.cpp b/hdiffz.cpp index 6a225bbf..c94b7ac9 100644 --- a/hdiffz.cpp +++ b/hdiffz.cpp @@ -517,7 +517,7 @@ static hpatch_BOOL _getIsVcDiffFile(const char* diffFileName) { #define _try_rt_dec(dec) { if (dec.is_can_open(compressType)) return &dec; } static hpatch_TDecompress* __find_decompressPlugin(const char* compressType){ -#if ((defined(_CompressPlugin_ldef))&&_CompressPlugin_ldef_is_use_zlib) +#if (0) //now closed ldef decompressor// ((defined(_CompressPlugin_ldef))&&_CompressPlugin_ldef_is_use_zlib) //NOTE: if _CompressPlugin_ldef_is_use_zlib==0, ldefDecompressPlugin can't support all of deflate encoding, only support for (p)ldefCompressPlugin! // if _CompressPlugin_ldef_is_use_zlib==1, ldefDecompressPlugin can support all of deflate encoding by zlib decompressor. _try_rt_dec(ldefDecompressPlugin); diff --git a/hpatchz.c b/hpatchz.c index d75c733f..a5ead0e6 100644 --- a/hpatchz.c +++ b/hpatchz.c @@ -79,7 +79,7 @@ #if (_IS_NEED_DEFAULT_CompressPlugin) //===== select needs decompress plugins or change to your plugin===== # define _CompressPlugin_zlib -# define _CompressPlugin_ldef +//# define _CompressPlugin_ldef # define _CompressPlugin_bz2 # define _CompressPlugin_lzma # define _CompressPlugin_lzma2 @@ -100,7 +100,7 @@ # define _CompressPlugin_ldef_is_use_zlib 1 //now ldef need zlib decompresser # endif # if ((defined(_CompressPlugin_zlib))&&_CompressPlugin_ldef_is_use_zlib) -# undef _CompressPlugin_zlib +# //undef _CompressPlugin_zlib # endif #endif @@ -790,7 +790,7 @@ int hpatch_cmd_line(int argc, const char * argv[]){ #define _try_rt_dec(dec) { if (dec.is_can_open(compressType)) return &dec; } static const hpatch_TDecompress* __find_decompressPlugin(const char* compressType){ -#if ((defined(_CompressPlugin_ldef))&&_CompressPlugin_ldef_is_use_zlib) +#if (0) //now closed ldef decompressor// ((defined(_CompressPlugin_ldef))&&_CompressPlugin_ldef_is_use_zlib) //NOTE: if _CompressPlugin_ldef_is_use_zlib==0, ldefDecompressPlugin can't support all of deflate encoding, only support for (p)ldefCompressPlugin! // if _CompressPlugin_ldef_is_use_zlib==1, ldefDecompressPlugin can support all of deflate encoding by zlib decompressor. _try_rt_dec(ldefDecompressPlugin);