phrohdoh / easage

A library that provides programmatic manipulation of BIG archives.
MIT License
9 stars 0 forks source link

Archive size and data_start calculations in packer::pack_directory are incorrect #19

Closed phrohdoh closed 6 years ago

phrohdoh commented 6 years ago

This is a regression introduced by 11d2c2f4569322887de59d3f88a62617dab061e5.

We are calculating these values based on the absolute path to the to-be-packed files instead of their path with the prefix stripped.

cc @Teteros (just so you know that using the --strip-prefix parameter will currently produce invalid BIGs)

Teteros commented 6 years ago

I can confirm easage pack with --strip-prefix @ https://github.com/Phrohdoh/easage/commit/493f06add111631fe6ae569f909451ae251d40f9 creates outputs that have md5 match with source md5s. (i.e crc perfect)

:+1:

Edit: @Phrohdoh I've also finally tested, and I can verify for the first time that contra packed via easage runs in-game in Zero Hour! Makes you wonder what it is that finalbig uses these for:

secret data: "L225\u{0}\u{0}\u{0}"
secret data len: 7

which easage leaves out.