dsh-zip-verify
IdentifiedCheck that a delivery zip really round-trips before you hand it over. `zip_verify` decompresses every entry, checks its CRC32, compares each file against a source directory by hash, and reports entry
dsh-zip-verify
交付包打出来之后,验证它真的能原样还原。
为什么
一个很正常的问题:用 Compress-Archive 打了个包,用 Git Bash 的 unzip 一看,
中文文件名全是乱码,还一堆告警。于是你以为包坏了,重新打一遍,还是一样。
包没坏,是解压工具解错了。 Compress-Archive 写的是 UTF-8 文件名,但经常不设 「UTF-8 标志位」,老工具就按系统代码页去解,于是乱码。
这个工具直接读 zip 的中央目录,按文件里的标志位判断该用什么编码,不给中间工具歪曲的机会。
两个工具
zip_verify
zip_verify D:\build\delivery.zip
4 entries · 599 B 解压后 · verdict: PASS
源目录 : D:\build\dist(4 个文件)
## 校验
逐条目解压 : 全部成功
CRC32 : 全部相符
压缩方式 : deflate
## 编码
3 个条目名是 UTF-8 内容但没打 UTF-8 标志位(兼容大部分解压工具,个别老工具会乱码)
## 问题
无 ✅
给 sourceDir 就逐文件对账:
## 问题
1 个文件内容不一致(sha256):
≠ js/app.js
四类问题分别报:缺文件、多文件、内容不一致、CRC 不符。
zip_list
只列条目,不校验。适合先看一眼包里到底装了什么。
几个实现细节
顶层目录自动剥离。 Compress-Archive 会把内容整包进一个与源目录同名的文件夹里,
于是包内路径是 dist/index.html 而源目录是 index.html。逐文件对账会全部失败。
这里会识别这种情况并提示「已剥离」,不是静默改路径。
Zip64。 超过 4 GB 或条目数超过 65535 时,32 位字段会溢出到 Zip64 扩展里。 解析器会读这些扩展,不会对着大包报「字段无效」。
不落盘解压。 条目在内存里 inflate,算完 CRC 和哈希就丢掉。不会在临时目录留一堆文件。
编码三级判定。 标志位说是 UTF-8 就按 UTF-8;没标志位但能按 UTF-8 解通,标成
utf-8 (recovered);解不通再试 GBK,都不行才退回 latin1。
安装
dsh plugin add github:Lee2277-t/dsh-zip-verify
配置
hash: sha256 # 对账哈希,也可用 md5
限制
- 只读:不创建、不修改 zip。
- 不支持分卷压缩包。
- 加密条目无法校验(会报解压失败,不会误判为通过)。
许可
AGPL-3.0-only。
Comments
Loading…
Similar plugins
by dingchenhui0618-arch
A delivery receipt panel for a project hand-off. One trigger collects the branch and commit, the test and build results, screenshot dimensions with sha256, and the secret-scan verdict, then assigns ev
★ 0
MIT
JavaScript
Oct 27, 2026
dsh plugin --profile web add dsh-delivery-receiptby dingchenhui0618-arch
A shareable delivery receipt for a project hand-off. The `ship_receipt` tool measures what it can and records what it was told, then sorts every line into three zones: verified (evidence this run prod
★ 0
MIT
JavaScript
Oct 27, 2026
dsh plugin --profile web add dsh-ship-receiptby Ushio155
Ships a skill for verifying a change with the cheapest check that still yields a definite answer: an L0-L3 cost ladder from static checks to a single suite, condition polling with a timeout instead of
★ 0
MIT
JavaScript
Oct 5, 2026
dsh plugin --profile web add dsh-verify-cheapStages exact DSH tool calls without dispatch, presents complete canonical arguments in a durable Batch Review Inbox, invalidates approvals after edits or restarts, and commits only a matching SHA-256
★ 0
dsh plugin --profile web add dsh-action-outboxdsh的diff审核
★ 1
MIT
JavaScript
dsh plugin --profile web add dsh-diff-reviewby 566001
收尾自检哨兵:AI 认为任务做完时调用 wrapup_check,插件自动跑测试/lint/audit,并强制「检查→修复→再检查」循环,直到连续三次全面检查零问题才判定收尾完成并弹通知。拦住「差不多可以了」。
★ 1
MIT
JavaScript
Oct 14, 2026
dsh plugin --profile web add dsh-wrapup-guard