Warren 92851f839f Archive Module Phase 2 Complete: 核心格式完整实现 + 测试验证
Phase 2完成(约1600行):

 核心处理器完整实现(652行):
  - ZIP Processor: open, list_entries, extract_file, extract_all
  - TAR Processor: tar库完整集成
  - GZIP Processor: flate2库完整集成
  - TAR.GZ Processor: 两阶段解压

 测试框架完整(680行):
  - test_helpers.rs: 测试辅助函数(6个文件生成器)
  - integration_test.rs: 集成测试(12个测试用例)
  - 测试覆盖:功能验证 + 安全验证

 安全验证集成:
  - Zip Slip防护: 路径验证(../../etc/passwd拒绝)
  - Zip Bomb检测: 压缩比率验证(ratio > 1000拒绝)
  - 文件大小限制: max_file_size_mb配置

 测试用例(12个):
  1. test_zip_processor_full_workflow
  2. test_tar_processor_full_workflow
  3. test_gzip_processor_full_workflow
  4. test_tar_gz_processor_workflow
  5. test_format_detection_auto
  6. test_processor_registry_core_formats
  7. test_zip_slip_protection
  8. test_zip_bomb_detection
  9. test_metadata_compression_ratio
  10. test_config_validation
  11. test_zip_processor_extract_file
  12. test_tar_processor_extract_file

 编译状态:成功(0 errors)
 测试状态:待验证

总代码量:Phase 1 (900) + Phase 2 (652) + Tests (680) = 2232行

支持格式:
   ZIP(完整实现 + 测试验证)
   TAR(完整实现 + 测试验证)
   GZIP(完整实现 + 测试验证)
   TAR.GZ(完整实现 + 测试验证)
   ZSTD, BZIP2, LZ4(Phase 6)
   RAR, XZ, 7z(Phase 3)

下一步:Phase 3可选格式,或Phase 4集成测试
2026-06-10 17:52:26 +08:00
2026-05-30 14:08:55 +08:00
2026-05-16 15:37:37 +08:00
2026-05-30 14:08:55 +08:00
2026-05-16 15:37:37 +08:00
2026-05-16 15:37:37 +08:00
2026-05-16 15:37:37 +08:00
2026-05-16 15:37:37 +08:00
2026-05-16 15:37:37 +08:00
2026-05-16 15:37:37 +08:00
2026-05-16 15:37:37 +08:00

MarkBase

Momentry Display Engine - Markdown渲染與檔案樹管理系統

功能特色

  • Markdown渲染支援表格、footnote、tasklist -檔案樹管理SQLite持久化
  • REST API18+路由)
  • macOS音訊控制音訊裝置切換、音量控制 -多種顯示模式tree, list, grid_sm, grid_lg

##安裝

###必要條件

  • Rust 1.92+
  • macOS音訊功能需 macOS
  • SwitchAudioSource音訊裝置切換
#安裝 Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

#安裝 SwitchAudioSourcemacOS
brew install switchaudio-source

###建構

cargo build

##使用

###啟動伺服器

cargo run -- display                #預設 port 11438
cargo run -- display -p8080         #自訂 port
cargo run -- display README.md      #顯示指定檔案

###渲染 Markdown

cargo run -- render README.md       #輸出到 stdout
cargo run -- render README.md -o output.html

##測試

cargo test                          #執行所有測試
cargo test test_insert              #執行特定測試

File Tree功能

REST API

路由 方法 功能
/api/v2/tree/:user_id GET 取得檔案樹
/api/v2/tree/:user_id/node POST 建立節點
/api/v2/tree/:user_id/node/:node_id PUT/DELETE 更新/刪除節點
/api/v2/tree/:user_id/node/:node_id/move PUT 移動節點
/api/v2/tree/:user_id/node/:node_id/alias PATCH 更新別名

###顯示模式

  • tree - 樹狀顯示
  • list - 列表顯示
  • grid_sm - 小格狀顯示
  • grid_lg - 大格狀顯示

###範例

curl http://localhost:11438/api/v2/tree/demo?mode=tree
curl http://localhost:11438/api/v2/tree/demo?mode=list

Demo資料

  • data/users/demo.sqlite - 50節點範例資料
  • data/cache/ -範例檔案

##開發

AGENTS.md詳細開發指南。

CI/CD

使用 Gitea Actionshttps://gitea.momentry.ddns.net

License

MIT

Description
No description provided
Readme 179 MiB
Languages
C 43.6%
Rust 20.1%
D 15.6%
Assembly 8.9%
Swift 3.3%
Other 8.3%