Skip to content

Commit

Permalink
update version & doc & CI;
Browse files Browse the repository at this point in the history
  • Loading branch information
housisong committed Jul 24, 2024
1 parent b259268 commit e42f404
Show file tree
Hide file tree
Showing 7 changed files with 58 additions and 23 deletions.
26 changes: 18 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,29 @@ jobs:
- uses: actions/checkout@v2
- name: makeInit
run: |
make LZMA=0 ZSTD=0 MD5=0 -j
make LDEF=0 LZMA=0 ZSTD=0 MD5=0 -j
make clean
- name: makeUnDef
- name: makeNoAll
run: |
git clone --depth=1 https://github.com/sisong/libmd5.git ../libmd5
git clone --depth=1 https://github.com/sisong/lzma.git ../lzma
git clone --depth=1 https://github.com/sisong/zstd.git ../zstd
make DIR_DIFF=0 MT=0 BSD=0 VCD=0 ZLIB=0 BZIP2=0 -j
make DIR_DIFF=0 MT=0 BSD=0 VCD=0 ZLIB=0 LDEF=0 BZIP2=0 -j
make clean
- name: makeNoldef
run: |
make LDEF=0 -j
make clean
- name: makeAll
run: |
git clone --depth=1 https://github.com/sisong/zlib.git ../zlib
git clone --depth=1 https://github.com/sisong/libdeflate.git ../libdeflate
make -j
make clean
- name: makeByCode
- name: makeByBz2Code
run: |
git clone --depth=1 https://github.com/sisong/zlib.git ../zlib
git clone --depth=1 https://github.com/sisong/bzip2.git ../bzip2
make ZLIB=1 BZIP2=1 -j
make BZIP2=1 -j
clang-build:
runs-on: ubuntu-latest
Expand All @@ -41,6 +46,8 @@ jobs:
git clone --depth=1 https://github.com/sisong/libmd5.git ../libmd5
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/zlib.git ../zlib
git clone --depth=1 https://github.com/sisong/libdeflate.git ../libdeflate
- name: makeByClang
run: |
make CL=1 -j
Expand All @@ -54,6 +61,8 @@ jobs:
git clone --depth=1 https://github.com/sisong/libmd5.git ../libmd5
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/zlib.git ../zlib
git clone --depth=1 https://github.com/sisong/libdeflate.git ../libdeflate
- name: buildByXcode
run: |
xcodebuild -workspace builds/xcode/HDiffPatch.xcworkspace -scheme hdiffz -configuration Release OBJROOT=$PWD/bin SYMROOT=$PWD/bin
Expand Down Expand Up @@ -114,11 +123,12 @@ jobs:
msbuild-architecture: x64
- name: initAndClone
run: |
git clone --depth=1 https://github.com/sisong/zlib.git ../zlib
git clone --depth=1 https://github.com/sisong/bzip2.git ../bzip2
git clone --depth=1 https://github.com/sisong/libmd5.git ../libmd5
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
git clone --depth=1 https://github.com/sisong/zlib.git ../zlib
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
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

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)
* add plugin ldefCompressPlugin, pldefCompressPlugin, ldefDecompressPlugin;
### Changed
* released Android libhpatchz.so support Android 15 with 16KB page size;

## [v4.7.0](https://github.com/sisong/HDiffPatch/tree/v4.7.0) - 2024-07-12
### Added
* cmdline hdiffz support option "-BSD -SD", to create diffFile compatible with another BSDIFF format "ENDSLEY/BSDIFF43", https://github.com/mendsley/bsdiff ; patch support this format from v4.6.7
Expand Down
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ MT := 1
# used libdeflate?
LDEF := 1
# 0: not need zlib; 1: compile zlib source code; 2: used -lz to link zlib lib;
ZLIB := 1
ifeq ($(LDEF),0)
ZLIB := 2
else
ZLIB := 1
endif
# 0: not need lzma; 1: compile lzma source code; 2: used -llzma to link lzma lib;
LZMA := 1
ARM64ASM := 0
Expand Down
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# [HDiffPatch]
[![release](https://img.shields.io/badge/release-v4.7.1-blue.svg)](https://github.com/sisong/HDiffPatch/releases)
[![release](https://img.shields.io/badge/release-v4.8.0-blue.svg)](https://github.com/sisong/HDiffPatch/releases)
[![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/sisong/HDiffPatch/blob/master/LICENSE)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-blue.svg)](https://github.com/sisong/HDiffPatch/pulls)
[![+issue Welcome](https://img.shields.io/github/issues-raw/sisong/HDiffPatch?color=green&label=%2Bissue%20welcome)](https://github.com/sisong/HDiffPatch/issues)
Expand Down Expand Up @@ -50,17 +50,19 @@ apply the delta:
`$ cd <dir>/HDiffPatch`
### Linux or MacOS X ###
Try:
`$ make LZMA=0 ZSTD=0 MD5=0`
`$ make LDEF=0 LZMA=0 ZSTD=0 MD5=0`
bzip2 : if the build fails with `fatal error: bzlib.h: No such file or directory`, use your system's package manager to install the libbz2 package and try again; or download & make with libbz2 source code:
```
$ git clone https://github.com/sisong/bzip2.git ../bzip2
$ make LZMA=0 ZSTD=0 MD5=0 BZIP2=1
$ make LDEF=0 LZMA=0 ZSTD=0 MD5=0 BZIP2=1
```
if need lzma zstd & md5 support, Try:
if need lzma zstd & md5 ... default support, Try:
```
$ git clone https://github.com/sisong/libmd5.git ../libmd5
$ git clone https://github.com/sisong/lzma.git ../lzma
$ git clone https://github.com/sisong/zstd.git ../zstd
$ git clone https://github.com/sisong/zlib.git ../zlib
$ git clone https://github.com/sisong/libdeflate.git ../libdeflate
$ make
```
Tip: You can use `$ make -j` to compile in parallel.
Expand All @@ -72,6 +74,7 @@ $ git clone https://github.com/sisong/libmd5.git ../libmd5
$ git clone https://github.com/sisong/lzma.git ../lzma
$ git clone https://github.com/sisong/zstd.git ../zstd
$ git clone https://github.com/sisong/zlib.git ../zlib
$ git clone https://github.com/sisong/libdeflate.git ../libdeflate
$ git clone https://github.com/sisong/bzip2.git ../bzip2
```

Expand Down Expand Up @@ -149,11 +152,14 @@ options:
-c-zlib[-{1..9}[-dictBits]] DEFAULT level 9
dictBits can 9--15, DEFAULT 15.
support run by multi-thread parallel, fast!
-c-ldef[-{1..12}] DEFAULT level 12
compatible with -c-zlib, faster or better compress than zlib;
used libdeflate compressor, & dictBits always 15.
support run by multi-thread parallel, fast!
-c-bzip2[-{1..9}] (or -bz2) DEFAULT level 9
-c-pbzip2[-{1..9}] (or -pbz2) DEFAULT level 8
support run by multi-thread parallel, fast!
NOTE: code not compatible with it compressed by -c-bzip2!
and code size may be larger than if it compressed by -c-bzip2.
-c-lzma[-{0..9}[-dictSize]] DEFAULT level 7
dictSize can like 4096 or 4k or 4m or 128m etc..., DEFAULT 8m
support run by 2-thread parallel.
Expand Down
19 changes: 13 additions & 6 deletions README_cn.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# [HDiffPatch]
[![release](https://img.shields.io/badge/release-v4.7.1-blue.svg)](https://github.com/sisong/HDiffPatch/releases)
[![release](https://img.shields.io/badge/release-v4.8.0-blue.svg)](https://github.com/sisong/HDiffPatch/releases)
[![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/sisong/HDiffPatch/blob/master/LICENSE)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-blue.svg)](https://github.com/sisong/HDiffPatch/pulls)
[![+issue Welcome](https://img.shields.io/github/issues-raw/sisong/HDiffPatch?color=green&label=%2Bissue%20welcome)](https://github.com/sisong/HDiffPatch/issues)
Expand Down Expand Up @@ -50,17 +50,19 @@
`$ cd <dir>/HDiffPatch`
### Linux or MacOS X ###
试试:
`$ make LZMA=0 ZSTD=0 MD5=0`
`$ make LDEF=0 LZMA=0 ZSTD=0 MD5=0`
bzip2 : 如果编译失败,显示 `fatal error: bzlib.h: No such file or directory`,请使用系统的包管理器安装libbz2,然后再试一次;或者下载并使用libbz2源代码来编译:
```
$ git clone https://github.com/sisong/bzip2.git ../bzip2
$ make LZMA=0 ZSTD=0 MD5=0 BZIP2=1
$ make LDEF=0 LZMA=0 ZSTD=0 MD5=0 BZIP2=1
```
如果需要支持 lzma、zstd 和 md5,试试:
如果需要支持 lzma、zstd 和 md5 等 默认编译设置,试试:
```
$ git clone https://github.com/sisong/libmd5.git ../libmd5
$ git clone https://github.com/sisong/lzma.git ../lzma
$ git clone https://github.com/sisong/zstd.git ../zstd
$ git clone https://github.com/sisong/zlib.git ../zlib
$ git clone https://github.com/sisong/libdeflate.git ../libdeflate
$ make
```
提示:你可以使用 `$ make -j` 来并行编译。
Expand All @@ -72,6 +74,7 @@ $ git clone https://github.com/sisong/libmd5.git ../libmd5
$ git clone https://github.com/sisong/lzma.git ../lzma
$ git clone https://github.com/sisong/zstd.git ../zstd
$ git clone https://github.com/sisong/zlib.git ../zlib
$ git clone https://github.com/sisong/libdeflate.git ../libdeflate
$ git clone https://github.com/sisong/bzip2.git ../bzip2
```

Expand Down Expand Up @@ -149,9 +152,13 @@ $ git clone https://github.com/sisong/bzip2.git ../bzip2
-c-zlib[-{1..9}[-dictBits]] 默认级别 9
压缩字典比特数dictBits可以为9到15, 默认为15。
支持多线程并行压缩,很快!
-c-ldef[-{1..12}] 默认级别 12
输出压缩数据格式兼容于-c-zlib, 但比zlib压缩得更快或压缩得更小;
使用了libdeflate压缩算法,且压缩字典比特数dictBits始终为15。
支持多线程并行压缩,很快!
-c-bzip2[-{1..9}] (或 -bz2) 默认级别 9
-c-pbzip2[-{1..9}] (或 -pbz2) 默认级别 8
支持并行压缩,生成的补丁和-c-bzip2的输出格式不同,一般也可能稍大一点
支持并行压缩,生成的补丁和-c-bzip2的输出格式稍有不同
-c-lzma[-{0..9}[-dictSize]] 默认级别 7
压缩字典大小dictSize可以设置为 4096, 4k, 4m, 128m等, 默认为8m
支持2个线程并行压缩。
Expand All @@ -161,7 +168,7 @@ $ git clone https://github.com/sisong/bzip2.git ../bzip2
警告: lzma和lzma2是不同的压缩编码格式。
-c-zstd[-{0..22}[-dictBits]] 默认级别 20
压缩字典比特数dictBits 可以为10到30, 默认为23。
支持多线程并行压缩,很快
支持多线程并行压缩,较快
-C-checksumType
为文件夹间diff设置数据校验算法, 默认为fadler64;
支持的校验选项:
Expand Down
2 changes: 1 addition & 1 deletion hdiffz.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ static void printUsage(){
# endif
#endif
#ifdef _CompressPlugin_ldef
" -c-ldef[-{1..12}] DEFAULT level 12\n"
" -c-ldef[-{1..12}] DEFAULT level 12\n"
" compatible with -c-zlib, faster or better compress than zlib;\n"
" used libdeflate compressor, & dictBits always 15.\n"
# if (_IS_USED_MULTITHREAD)
Expand Down
4 changes: 2 additions & 2 deletions libHDiffPatch/HPatch/patch_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ extern "C" {
#endif

#define HDIFFPATCH_VERSION_MAJOR 4
#define HDIFFPATCH_VERSION_MINOR 7
#define HDIFFPATCH_VERSION_RELEASE 1
#define HDIFFPATCH_VERSION_MINOR 8
#define HDIFFPATCH_VERSION_RELEASE 0

#define _HDIFFPATCH_VERSION HDIFFPATCH_VERSION_MAJOR.HDIFFPATCH_VERSION_MINOR.HDIFFPATCH_VERSION_RELEASE
#define _HDIFFPATCH_QUOTE(str) #str
Expand Down

0 comments on commit e42f404

Please sign in to comment.