Unity-Technologies / Unity-Technologies/UnityDataTools

Support repacking Archives (Lz4 compression configuration)

Đang mở
#64 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Ngôn ngữ chính
C#
Star
821
Fork
71
Merge trung bình
3 giờ 13 phút
Pull request đã merge (30 ngày)
9

Mô tả

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.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu với lệnh archive và siêu dữ liệu về block và directory được #62 cung cấp. Xác định cách đọc và đóng gói lại một Archive hiện có trong khi vẫn bảo toàn nội dung của nó, sau đó chỉ định cấu hình cho kích thước block, ranh giới file, padding và fallback nén; hoàn thành khi Unity có thể tải archive thu được.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
csharp, unity
Lĩnh vực
cli, tooling
Loại issue
Tính năng
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.