Unity-Technologies / Unity-Technologies/UnityDataTools

Support repacking Archives (Lz4 compression configuration)

オープン
#64 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
C#
スター
821
フォーク
71
平均マージ
3時間 13分
マージ済み PR(30日)
9

説明

With #62 the archive command is exposing the blocks and directory section of the archive metadata.
This task is to add an option for "repacking" an existing Archive file (e.g. an AssetBundle) into a freshly compressed Archive that has the same content.

Unity already has AssetBundle.RecompressAssetBundleAsync which can handle some transformation, for example compressed to uncompressed.

However currently there is no way to influence how files are split into individual blocks for the block based compression (LZ4 and LZ4HC). Unity always uses 128KB block size and will span over file boundaries.

This task is to add a command for repacking an archive. It could take the following configuration parameters:

  • more variability for the block sizes (max block size uncompressed (input) data, max block size compressed data)
  • how file boundaries are handled (span or always split)
  • padding between files
  • minimum compression factor (at what ratio to fallback to uncompressed) - avoiding on a block by block based an extra layer of compression when the data is already compressed.

This would allow some optimization, including picking configurations specifically fine tuned to the target platform's characteristics.

In my understanding so long as the Block and Directory data structures are properly populated then the Unity Runtime will be able to load the archive data properly, e.g that it already could support reading a wider range of blocking.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

archive コマンドと #62 で公開されたブロックおよびディレクトリのメタデータから始めます。既存の Archive をその内容を保持したまま読み取り、再パックする方法を定義し、ブロックサイズ、ファイル境界、パディング、圧縮フォールバックの設定を指定します。完了条件は、Unity が生成されたアーカイブを読み込めることです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
csharp, unity
領域
cli, tooling
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
静か
明瞭さ
説明が足りない
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。