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 an configuration parameters that would offer:
- 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.
With #62 the
archivecommand 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 an configuration parameters that would offer:
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.