Releases: reactnativecn/node-hdiffpatch
Releases · reactnativecn/node-hdiffpatch
Release list
v2.3.0
Add optional, bounded LZMA2 match-finder multithreading with deterministic byte-identical output. The default remains one thread; compression level 9 and the 8 MiB dictionary are unchanged. Published prebuilds target Linux x64/arm64 and macOS arm64.
v2.2.2
v2.2.1
Fixes
- Compatibility: single-format (HDIFFSF20) diffs that store the payload raw (compression would expand it) no longer carry a stale
lzma2compressType label. Old decoders (HDiffPatch ~4.x, including react-native-update clients in the field) decide whether to decompress from the label alone and failed withhpatch error -4on such diffs — typically tiny diffs between near-identical bundles. Output is now byte-compatible with 1.x for this case. Applies todiff(),diffWindow(), anddiffSingleStream();diffStream(HDIFF13) was never affected.
Upgrade urgency: high if you generate update diffs with 2.0.3–2.2.0 — a small enough diff generated by those versions fails to apply on all deployed clients that predate the reader-side guard.
v2.2.0
Added
diffWindow(oldPath, newPath, outDiffPath[, windowSize][, cb]): optionalwindowSize(bytes, default 2MB) controls the sliding window over old data. Larger windows catch longer-distance content moves at roughly linear additional memory — useful when a bundle's sections move further than 2MB between versions.
v2.1.0
Added
diffWindow(oldPath, newPath, outDiffPath[, cb]): window/fast-match single-format generation — big covers from streaming block matching + suffix-string refinement inside a 2MB sliding window over old data. Match quality is close to in-memorydiff()while memory stays at the streaming tier.- Output is standard HDIFFSF20: applies via
patch(),patchSingleStream(), and all existing single-format apply sides (verified byte-exact against the legacy v3.1.1 client patch core). No consumer changes needed.
Benchmarks (vs diffSingleStream, block=64)
| pair | diffSingleStream | diffWindow | in-memory diff |
|---|---|---|---|
| 218KB Hermes HBC | 19,034 B | 4,920 B | 4,929 B |
| 100MB similar | 2,258 B | 455 B | — |
Peak RSS on the 100MB pair: ~27MB for both streaming modes.
v2.0.3
v2.0.2
v2.0.1
v2.0.0
Breaking Changes
- Removed
diffWithCovers. 该实验性 API 无消费方;移除后 HDiffPatch 子模块可直接跟踪纯上游(v5.0.1),不再携带自有补丁。
What's Changed
- Vendored HDiffPatch v3.1.1 → v5.0.1,lzma SDK → v26.02。同输入产物逐字节同级、diff 速度持平;patch 双向兼容已验证(老库产物 ↔ 新库应用)。
- 新增
diffSingleStream(oldPath, newPath, outDiffPath[, cb]):流式块匹配生成 single 格式(与diff()同格式)——生成端内存 O(匹配块),实测 100MB 输入仅 ~27MB RSS 增量;产物经旧版(v3.1.1)客户端 patch 内核逐字节验证可直接应用,存量客户端零升级即可受益。 - 关闭 v5 默认的 diff 进度打印,保持服务端 worker 日志干净。
Full Changelog: v1.3.0...v2.0.0
v1.3.1
Fixes
- Restore glibc ≥ 2.33 compatibility for the linux-x64/arm64 prebuilds. v1.3.0's prebuilds required GLIBC_2.38 (via
__isoc23_strtoull) and failed to load on Ubuntu 22.04, Debian 12, and all bookworm-based official Node Docker images. The uint64 string parser no longer usesstrtoull; accepted input grammar is unchanged (canonical decimal only, overflow rejected).
If you saw ERR_DLOPEN_FAILED: version GLIBC_2.38 not found after upgrading to 1.3.0, this release fixes it.