Skip to content

Commit

Permalink
hpatchz now default closed libdeflate decompressor;
Browse files Browse the repository at this point in the history
  • Loading branch information
housisong committed Jul 25, 2024
1 parent 8e7976a commit 0d09620
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion decompress_plugin_demo.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion hdiffz.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions hpatchz.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 0d09620

Please sign in to comment.