Draft GeneralUpdate.Differential component documentation#57
Merged
Conversation
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>
e3587e0 to
bab7409
Compare
There was a problem hiding this comment.
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 (
DifferentialvsCore DiffPipelinevsTools). - 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. | |
This was referenced Jun 3, 2026
Collaborator
Author
|
Closes #49 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Validation