Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
4338e47
recode loadOldAndNewStream(); recode class TBloomFilter for optimize…
sisong Sep 22, 2025
f00fb26
recode TDigestMatcher, share some code to "digest_match_private_types…
sisong Sep 25, 2025
02d691b
remove cover32 hpatch_TCover32 & hpatch_TCover_sz & TRefCovers , all…
sisong Sep 29, 2025
98c8341
recode isZeroSubDiff --> isExtendedCover
sisong Sep 29, 2025
8da1ee9
move file libHDiffPatch/HDiff/match_block.h & .cpp to path libHDiffPa…
sisong Sep 29, 2025
9e858d9
recode diff API; recode match_block move code to diff.cpp; -m defaul…
sisong Oct 2, 2025
8a99dc3
init add TWindowMatcher;
sisong Oct 3, 2025
8a217e2
reset vc build out path; recode sstring search; recode hpatch_packU…
sisong Oct 7, 2025
36c4acd
fix vc&xocde build CI;
sisong Oct 11, 2025
b61b160
Merge branch 'master' into v5.0-dev/dev-4.x
sisong May 13, 2026
0ef01f5
Merge branch 'v5.0-dev/dev-4.x' into v5.0-dev/diff-by-window
sisong May 13, 2026
cd0880d
init add TCoversRange;
sisong May 13, 2026
9cce874
get_match_covers_by_window() parallel process windows, & add struct T…
sisong May 21, 2026
15111b2
TWindowMatcher::search_windows() ok
sisong Jun 2, 2026
9b8fa77
TWindowMatcher add _splitLargeCovers();
sisong Jun 3, 2026
0631996
clipRangeByOld() & clipRangeByNew() init implementation
sisong Jun 4, 2026
eb504d7
add _clip_edge_ranges() & _extend_interior_ranges()
sisong Jun 6, 2026
6b8d881
recode get_match_windows() to get_match_windows_from_baseCovers();
sisong Jun 6, 2026
83b2afb
hdiffz support -w mode
sisong Jun 7, 2026
e7c2eef
TCoversOptimMem_blockCovers used bigCovers for diff speed;
sisong Jun 7, 2026
0431967
-VCD supoort -w (out VCDiff format support src & dst window size)
sisong Jun 8, 2026
e872b92
other build ok; update info;
sisong Jun 8, 2026
0d0cc8b
fix CI;
sisong Jun 8, 2026
1fa549d
added create_window_diff(),serialize_window_diff()
sisong Jun 9, 2026
99a3a19
hdiffz cmdline support -WD, create window diffData;
sisong Jun 9, 2026
12474da
checksum new&old&diff datas ok
sisong Jun 10, 2026
9a8bc6c
add patch_window_diff() getWindowDiffInfo() check_window_diff()
sisong Jun 11, 2026
913514b
unit_test add window diff;
sisong Jun 11, 2026
c8cd2a2
support resave window diff;
sisong Jun 12, 2026
45c91cd
unit_test ok;
sisong Jun 13, 2026
61a5036
saved window old range by batch
sisong Jun 13, 2026
5fae3e1
patch_window_diff() support multi-thread;
sisong Jun 16, 2026
39ac6a2
optimize patch_window_diff mt memsize;
sisong Jun 18, 2026
9238b28
patch_window_diff() dispose for input error diffData;
sisong Jun 18, 2026
89bb9a9
hpatchz &dir-diff & dir-patch support window diff fomat;
sisong Jun 20, 2026
db7aecb
some recode & update some doc;
sisong Jun 22, 2026
ff411a0
build with NDK\gcc\xcode
sisong Jun 22, 2026
b0c8523
update version & log & readme;
sisong Jun 23, 2026
d83e725
fixed vc version for CI;
sisong Jun 23, 2026
78d2b87
always write HDiffzAppHead tag for compatible with the nuances of the…
sisong Jun 24, 2026
1258b56
update test result for v5.0.0; fix mem align on MT patch;
sisong Jun 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 18 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: ci
on: [push, pull_request]
jobs:

gcc-build:
strategy:
matrix:
Expand All @@ -25,9 +26,9 @@ jobs:
git clone --depth=1 https://github.com/sisong/bzip2.git ../bzip2
git clone --depth=1 https://github.com/sisong/zlib.git ../zlib
git clone --depth=1 https://github.com/sisong/libdeflate.git ../libdeflate
make CC=gcc CXX=g++ BZIP2=1 -j
make CC=gcc CXX=g++ -j
./unit_test
make BZIP2=1 clean
make clean

clang-build:
strategy:
Expand All @@ -49,9 +50,9 @@ jobs:
git clone --depth=1 https://github.com/sisong/bzip2.git ../bzip2
git clone --depth=1 https://github.com/sisong/zlib.git ../zlib
git clone --depth=1 https://github.com/sisong/libdeflate.git ../libdeflate
make CL=1 BZIP2=1 -j
make CL=1 -j
./unit_test
make CL=1 BZIP2=1 clean
make CL=1 clean

xcode-build:
runs-on: macos-latest
Expand Down Expand Up @@ -80,6 +81,8 @@ jobs:
ndk-version: r23c
- name: buildByAndroidNDK
run: |
git clone --depth=1 https://github.com/sisong/libmd5.git ../libmd5
git clone --depth=1 https://github.com/sisong/xxHash.git ../xxHash
git clone --depth=1 https://github.com/sisong/lzma.git ../lzma
git clone --depth=1 https://github.com/sisong/zstd.git ../zstd
cd ./builds/android_ndk_jni_mk
Expand All @@ -94,11 +97,13 @@ jobs:
ndk-version: r23c
- name: buildByAndroidNDK
run: |
git clone --depth=1 https://github.com/sisong/libmd5.git ../libmd5
git clone --depth=1 https://github.com/sisong/xxHash.git ../xxHash
git clone --depth=1 https://github.com/sisong/lzma.git ../lzma
git clone --depth=1 https://github.com/sisong/zstd.git ../zstd
git clone --depth=1 https://github.com/sisong/bzip2.git ../bzip2
cd ./builds/android_ndk_jni_mk
ndk-build NDK_PROJECT_PATH=. NDK_APPLICATION_MK=./Application.mk BSD=1 BZIP2=1
ndk-build NDK_PROJECT_PATH=. NDK_APPLICATION_MK=./Application.mk BSD=1 BZIP2=1 MT=0

ubuntu-ndk-build:
runs-on: ubuntu-latest
Expand All @@ -113,17 +118,19 @@ jobs:
sudo dpkg -i libtinfo5_6.4-2_amd64.deb
curl -O http://launchpadlibrarian.net/648013227/libncurses5_6.4-2_amd64.deb
sudo dpkg -i libncurses5_6.4-2_amd64.deb
git clone --depth=1 https://github.com/sisong/libmd5.git ../libmd5
git clone --depth=1 https://github.com/sisong/xxHash.git ../xxHash
git clone --depth=1 https://github.com/sisong/lzma.git ../lzma
git clone --depth=1 https://github.com/sisong/bzip2.git ../bzip2
git clone --depth=1 https://github.com/sisong/zstd.git ../zstd
git clone --depth=1 https://github.com/sisong/bzip2.git ../bzip2
cd ./builds/android_ndk_jni_mk
ndk-build NDK_PROJECT_PATH=. NDK_APPLICATION_MK=./Application.mk BSD=1 BZIP2=1 VCD=1
ndk-build NDK_PROJECT_PATH=. NDK_APPLICATION_MK=./Application.mk BSD=1 BZIP2=1 VCD=1 DIR=1

vc-build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: microsoft/setup-msbuild@v2
- uses: microsoft/setup-msbuild@v3
with:
msbuild-architecture: x64
- name: initAndClone
Expand All @@ -137,4 +144,6 @@ jobs:
git clone --depth=1 https://github.com/sisong/libdeflate.git ../libdeflate
- name: buildByVC
run: |
msbuild builds/vc/HDiffPatch.sln -t:rebuild -verbosity:diag -property:Configuration=Release
msbuild builds/vc/HDiffPatch.sln -t:rebuild -v:q -property:Platform=x64 -property:Configuration=Release /p:PlatformToolset=v145
msbuild builds/vc/HDiffPatch.sln -t:rebuild -v:q -property:Platform=x86 -property:Configuration=Release /p:PlatformToolset=v145
msbuild builds/vc/HDiffPatch.sln -t:rebuild -v:q -property:Platform=ARM64 -property:Configuration=Release /p:PlatformToolset=v145
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@

full changelog at: https://github.com/sisong/HDiffPatch/commits

## [v5.0.0](https://github.com/sisong/HDiffPatch/tree/v5.0.0) - 2026-06-25
### Added
* add new format Window Diff(`HDIFFW26`) for optimize patch speed, by `$hdiffz -WD[-stepSize]`;
* new format Window Diff native support checksum, & auto run checksum when patch;
* cmdline hdiffz support `-w[-oldWinSize-segSize]` window mode diff for -WD; & can run with -SD or other Diff format;
* fully compatible with VCDIFF format window constraints when diff by `$hdiffz -VCD[...] -w[-oldWinSize-segSize-newWinSize]`;
* add function create_window_diff()/patch_window_diff()/serialize_window_diff()/resave_window_diff()/getWindowDiffInfo();
### Changed
* remove hpatch_TCover32/hpatch_TCover_sz/hpatch_TOutputCovers types, all use 64-bit hpatch_TCover;
* `-m` default match score changed from 6 to 4;

## [v4.12.2](https://github.com/sisong/HDiffPatch/tree/v4.12.2) - 2026-03-09
### Fixed
* Fixed the linking libhpatchz.a error in iOS & MacOS SDK;
Expand Down
18 changes: 8 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,10 @@ MINS := 0
VCD := 1
# need support bsdiff&bspatch?
BSD := 1
# 0: not need bzip2 (must BSD=0); 1: compile bzip2 source code; 2: used -lbz2 to link bzip2 lib;
BZIP2 := 1
ifeq ($(OS),Windows_NT) # mingw?
CC := gcc
BZIP2 := 1
else
# 0: not need bzip2 (must BSD=0); 1: compile bzip2 source code; 2: used -lbz2 to link bzip2 lib;
BZIP2 := 2
endif
ifeq ($(BSD),0)
else
Expand Down Expand Up @@ -65,11 +63,13 @@ ATOMIC_U64 := 1
HDIFF_OBJ :=
HPATCH_OBJ := \
libHDiffPatch/HPatch/patch.o \
libHDiffPatch/HDiff/private_diff/limit_mem_diff/adler_roll.o \
file_for_patch.o

ifeq ($(MT),0)
else
HPATCH_OBJ+=libHDiffPatch/HPatch/hpatch_mt/_hcache_old_mt.o \
libHDiffPatch/HPatch/hpatch_mt/_hcache_window_old_mt.o \
libHDiffPatch/HPatch/hpatch_mt/_hinput_mt.o \
libHDiffPatch/HPatch/hpatch_mt/_houtput_mt.o \
libHDiffPatch/HPatch/hpatch_mt/_hpatch_mt.o \
Expand All @@ -85,8 +85,7 @@ else
dirDiffPatch/dir_patch/ref_stream.o \
dirDiffPatch/dir_patch/new_stream.o \
dirDiffPatch/dir_patch/dir_patch_tools.o \
dirDiffPatch/dir_patch/new_dir_output.o \
libHDiffPatch/HDiff/private_diff/limit_mem_diff/adler_roll.o
dirDiffPatch/dir_patch/new_dir_output.o
endif

ifeq ($(BSD),0)
Expand Down Expand Up @@ -222,19 +221,18 @@ HDIFF_OBJ += \
hdiffz_import_patch.o \
libHDiffPatch/HPatchLite/hpatch_lite.o \
libHDiffPatch/HDiff/diff.o \
libHDiffPatch/HDiff/match_block.o \
libHDiffPatch/HDiff/private_diff/match_block.o \
libHDiffPatch/HDiff/private_diff/bytes_rle.o \
libHDiffPatch/HDiff/private_diff/suffix_string.o \
libHDiffPatch/HDiff/private_diff/compress_detect.o \
libHDiffPatch/HDiff/private_diff/limit_mem_diff/digest_matcher.o \
libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.o \
libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort64.o \
libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort.o \
libHDiffPatch/HDiff/private_diff/window_diff/window_matcher.o \
libHDiffPatch/HDiff/private_diff/window_diff/covers_range.o \
dirDiffPatch/dir_diff/dir_diff_tools.o \
$(HPATCH_OBJ)
ifeq ($(DIR_DIFF),0)
HDIFF_OBJ += libHDiffPatch/HDiff/private_diff/limit_mem_diff/adler_roll.o
endif

ifeq ($(DIR_DIFF),0)
else
Expand Down
Loading
Loading