Skip to content

Draft GeneralUpdate.Differential component documentation#57

Merged
JusterZhu merged 4 commits into
mainfrom
docs/generalupdate-differential-draft
Jun 3, 2026
Merged

Draft GeneralUpdate.Differential component documentation#57
JusterZhu merged 4 commits into
mainfrom
docs/generalupdate-differential-draft

Conversation

@JusterZhu

Copy link
Copy Markdown
Collaborator

Summary

  • Rewrites the GeneralUpdate.Differential component docs from the current latest source APIs.
  • Documents IBinaryDiffer, BsdiffDiffer, StreamingHdiffDiffer, compression providers, patch format, Core DiffPipeline integration, Tools relationship, concurrency, and extension points.
  • Syncs the Chinese base doc, zh-Hans i18n doc, and English i18n doc.

Validation

  • git --no-pager diff --check
  • npm run build -- --no-minify

JusterZhu and others added 4 commits June 3, 2026 15:48
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@JusterZhu JusterZhu force-pushed the docs/generalupdate-differential-draft branch from e3587e0 to bab7409 Compare June 3, 2026 07:48
@JusterZhu JusterZhu marked this pull request as ready for review June 3, 2026 07:48
Copilot AI review requested due to automatic review settings June 3, 2026 07:48

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR rewrites the GeneralUpdate.Differential documentation to reflect the current component boundaries and APIs, and syncs the updated content across the Chinese base doc and the English / zh-Hans i18n variants.

Changes:

  • Replaces the legacy “DifferentialCore / directory diff” narrative with an explicit component boundary model (Differential vs Core DiffPipeline vs Tools).
  • Adds updated API-centric documentation for IBinaryDiffer, built-in differ implementations, patch header format, and compression providers.
  • Keeps the three doc variants (CN base, EN i18n, zh-Hans i18n) aligned in structure and content.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.

File Description
website/docs/doc/GeneralUpdate.Differential.md Rewritten Chinese base Differential docs based on current APIs and layering guidance.
website/i18n/en/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.Differential.md Synced English i18n version of the rewritten Differential docs.
website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.Differential.md Synced zh-Hans i18n version of the rewritten Differential docs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

| 差分算法实现 | 是 | 当前主要实现为 `BsdiffDiffer` 和 `StreamingHdiffDiffer`。 |
| 补丁数据压缩/解压 | 是 | 通过 `ICompressionProvider` 抽象,内置 BZip2、Deflate,源码中预留 .NET 6+ Brotli。 |
| 目录级新旧版本对比 | 否 | 由 `GeneralUpdate.Core.Pipeline.DiffPipeline` 的 matcher 负责。 |
| 新增文件复制、删除清单、批量 patch 命名 | 否 | 由 `DiffPipeline` 负责生成 `.patch` 文件、复制新增文件和写入 `generalupdate.delete.json`。 |
| --- | --- | --- | --- |
| `BZip2CompressionProvider` | `0x00` | 可用 | `BsdiffDiffer` 默认值,兼容旧 BSDIFF 补丁。 |
| `DeflateCompressionProvider` | `0x01` | 可用 | BCL `DeflateStream`,解压速度更适合客户端更新。 |
| `BrotliCompressionProvider` | `0x02` | 源码中以 `NET6_0_OR_GREATER` 条件编译预留 | 当前 `GeneralUpdate.Differential` 项目目标为 `netstandard2.0`,并且补丁读取逻辑当前只识别 `0x00` / `0x01`,不要把 Brotli 作为生产更新包格式。 |
| 差分算法实现 | 是 | 当前主要实现为 `BsdiffDiffer` 和 `StreamingHdiffDiffer`。 |
| 补丁数据压缩/解压 | 是 | 通过 `ICompressionProvider` 抽象,内置 BZip2、Deflate,源码中预留 .NET 6+ Brotli。 |
| 目录级新旧版本对比 | 否 | 由 `GeneralUpdate.Core.Pipeline.DiffPipeline` 的 matcher 负责。 |
| 新增文件复制、删除清单、批量 patch 命名 | 否 | 由 `DiffPipeline` 负责生成 `.patch` 文件、复制新增文件和写入 `generalupdate.delete.json`。 |
| --- | --- | --- | --- |
| `BZip2CompressionProvider` | `0x00` | 可用 | `BsdiffDiffer` 默认值,兼容旧 BSDIFF 补丁。 |
| `DeflateCompressionProvider` | `0x01` | 可用 | BCL `DeflateStream`,解压速度更适合客户端更新。 |
| `BrotliCompressionProvider` | `0x02` | 源码中以 `NET6_0_OR_GREATER` 条件编译预留 | 当前 `GeneralUpdate.Differential` 项目目标为 `netstandard2.0`,并且补丁读取逻辑当前只识别 `0x00` / `0x01`,不要把 Brotli 作为生产更新包格式。 |
| Differ algorithm implementations | Yes | Current main implementations are `BsdiffDiffer` and `StreamingHdiffDiffer`. |
| Compress and decompress patch data | Yes | Abstracted by `ICompressionProvider`; BZip2 and Deflate are available, with .NET 6+ Brotli reserved in source. |
| Compare old and new directories | No | Handled by matchers in `GeneralUpdate.Core.Pipeline.DiffPipeline`. |
| Copy new files, write delete manifests, name batch patches | No | Handled by `DiffPipeline`, which writes `.patch` files, copies new files, and writes `generalupdate.delete.json`. |
| --- | --- | --- | --- |
| `BZip2CompressionProvider` | `0x00` | Available | Default for `BsdiffDiffer`; compatible with legacy BSDIFF patches. |
| `DeflateCompressionProvider` | `0x01` | Available | BCL `DeflateStream`; friendlier decompression speed for client updates. |
| `BrotliCompressionProvider` | `0x02` | Reserved in source behind `NET6_0_OR_GREATER` | The current `GeneralUpdate.Differential` project targets `netstandard2.0`, and the patch reader currently recognizes only `0x00` and `0x01`, so do not use Brotli for production update packages. |
@JusterZhu JusterZhu merged commit 846abdb into main Jun 3, 2026
2 checks passed
@JusterZhu

Copy link
Copy Markdown
Collaborator Author

Closes #49

@JusterZhu JusterZhu deleted the docs/generalupdate-differential-draft branch June 3, 2026 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants