Skip to content

Commit df6c74c

Browse files
committed
fix(docs): correct multiple documentation bugs
- Add missing RLE magic number in algorithm docs and C++ API - Remove duplicate Streaming API link in architecture page - Fix table formatting error in zh/algorithms guide - Add missing State Machine link in EN sidebar - Update BibTeX year from 2024 to 2026 - Unify file size units to KiB (IEC standard)
1 parent 66b84d3 commit df6c74c

13 files changed

Lines changed: 20 additions & 16 deletions

File tree

docs/.vitepress/config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ const sharedSidebar = {
2828
items: [
2929
{ text: 'Algorithm Academy', link: '/en/academy/' },
3030
{ text: 'Huffman Coding', link: '/en/academy/huffman' },
31+
{ text: 'State Machine Design', link: '/en/academy/state-machine' },
3132
],
3233
},
3334
{

docs/en/algorithms/range.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,9 @@ let decoded = rangecoder::decode(&encoded, &cum_freq, data.len())?;
161161

162162
::: warning Performance Issue with Large Files
163163

164-
The current Range Coder implementation has a **known decode performance issue** for files larger than **500 KB**. The decode operation may become significantly slower or appear to hang.
164+
The current Range Coder implementation has a **known decode performance issue** for files larger than **500 KiB**. The decode operation may become significantly slower or appear to hang.
165165

166-
**Workaround**: For testing purposes, use files smaller than 100 KB. This is reflected in the CI pipeline which uses 100 KB test files for Range Coder verification.
166+
**Workaround**: For testing purposes, use files smaller than 100 KiB. This is reflected in the CI pipeline which uses 100 KiB test files for Range Coder verification.
167167

168168
**Status**: This is a known issue that is documented for future improvement. The encode operation works correctly for all file sizes.
169169

docs/en/algorithms/rle.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ pub fn encode(data: &[u8]) -> Vec<u8> {
9292

9393
| Field | Size | Description |
9494
|-------|------|-------------|
95+
| Magic | 4 bytes | `RLE\x00` (0x52 0x4C 0x45 0x00) |
9596
| Count | 4 bytes | Little-endian unsigned int (run length) |
9697
| Value | 1 byte | The repeated byte value |
9798

docs/en/api/cpp.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,10 @@ g++ -std=c++17 -O2 -Wall -Wextra -o <binary> main.cpp
9393

9494
### File Format
9595

96-
Repeated `(count: uint32 LE, value: byte)` pairs.
96+
| Offset | Size | Field |
97+
|--------|------|-------|
98+
| 0 | 4B | Magic: `RLE\x00` |
99+
| 4+ | Variable | Repeated `(count: uint32 LE, value: byte)` pairs |
97100

98101
---
99102

docs/en/architecture/index.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,5 @@ Hidden complexity:
180180

181181
## Further Reading
182182

183-
- [Streaming API](/en/api/streaming) - 5-state FSM details
184-
- [Streaming API](/en/api/streaming) - Complete API documentation
183+
- [Streaming API](/en/api/streaming) - 5-state FSM details and complete API documentation
185184
- [Cross-Language Testing](/en/testing/cross-language) - Conformance verification

docs/en/guide/algorithms.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ cargo run --bin rangecoder -- decode output.rcnc restored.bin
158158
:::
159159

160160
::: warning Performance Note
161-
The Range Coder decoder has a known performance issue for files >500KB. Use smaller test files for cross-language verification.
161+
The Range Coder decoder has a known performance issue for files >500 KiB. Use smaller test files for cross-language verification.
162162
:::
163163

164164
---

docs/en/reference/bibliography.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,10 @@ This document collects classic papers, authoritative textbooks, and related open
107107
If you reference CompressKit in academic work, we suggest using the following format:
108108

109109
```bibtex
110-
@misc{compresskit2024,
110+
@misc{compresskit2026,
111111
author = {CompressKit Team},
112112
title = {CompressKit: Cross-Language Lossless Compression Algorithms},
113-
year = {2024},
113+
year = {2026},
114114
publisher = {GitHub},
115115
url = {https://github.com/LessUp/compress-kit}
116116
}

docs/en/testing/cross-language.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ Detailed format specifications are available in the specs directory:
8989

9090
| Algorithm | Limitation | Workaround |
9191
|-----------|-----------|------------|
92-
| Range Coder | Decode performance degrades >500KB | Use smaller chunks |
92+
| Range Coder | Decode performance degrades >500 KiB | Use smaller chunks |
9393

9494
## Reporting Issues
9595

docs/zh/algorithms/range.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,9 @@ let decoded = rangecoder::decode(&encoded, &cum_freq, data.len())?;
162162

163163
::: warning 大文件性能问题
164164

165-
当前 Range Coder 实现存在一个**已知的解码性能问题**:当文件大于 **500 KB** 时,解码操作可能会变得非常缓慢或出现卡顿。
165+
当前 Range Coder 实现存在一个**已知的解码性能问题**:当文件大于 **500 KiB** 时,解码操作可能会变得非常缓慢或出现卡顿。
166166

167-
**临时解决方案**:测试时请使用小于 100 KB 的文件。CI 管道中已使用 100 KB 测试文件进行 Range Coder 验证。
167+
**临时解决方案**:测试时请使用小于 100 KiB 的文件。CI 管道中已使用 100 KiB 测试文件进行 Range Coder 验证。
168168

169169
**状态**:这是一个已知问题,已记录以便未来改进。编码操作对所有文件大小均正常工作。
170170

docs/zh/algorithms/rle.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ pub fn encode(data: &[u8]) -> Vec<u8> {
9292

9393
| 字段 | 大小 | 描述 |
9494
|------|------|------|
95+
| Magic | 4 字节 | `RLE\x00` (0x52 0x4C 0x45 0x00) |
9596
| 计数 | 4 字节 | 小端序无符号整数(行程长度) |
9697
|| 1 字节 | 重复的字节值 |
9798

0 commit comments

Comments
 (0)