Unity-Technologies / Unity-Technologies/UnityDataTools

Support repacking Archives (Lz4 compression configuration)

Offen
#64 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Vorherrschende Sprache
C#
Sterne
821
Forks
71
Ø Merge
3 Std. 13 Min.
Gemergte PRs (30 T.)
9

Beschreibung

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.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne mit dem archive-Befehl und den durch #62 offengelegten Block- und Verzeichnis-Metadaten. Lege fest, wie ein bestehendes Archive gelesen und neu gepackt wird, wobei sein Inhalt erhalten bleibt, und spezしてere die Konfiguration für Blockgrößen, Dateigrenzen, Padding und die Komprimierungs-Fallback-Option; abgeschlossen ist es, wenn Unity das resultierende Archiv laden kann.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
csharp, unity
Bereich
cli, tooling
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Ruhig
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.