Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate why .ctf files have additional 8 bytes of data #15

Open
victorbush opened this issue Apr 19, 2020 · 0 comments
Open

Investigate why .ctf files have additional 8 bytes of data #15

victorbush opened this issue Apr 19, 2020 · 0 comments

Comments

@victorbush
Copy link
Collaborator

For car nef files, there is a *.ctf file in the archive. This file does not have any part 4 data (its p4 index is -1). But the extracted size listed in the part 1 entry is always 8 bytes short. This was confirmed by looking at the diffs between an original nefs archive and an archive saved by NeFSEdit. For now, we are just manually adding the 8 bytes in NefsWriter.cs.

            if (item.CompressedSize == item.ExtractedSize
                && item.ExtractedSize != 1
                && item.Part6Unknown0x02 != 3)
            {
                // Add 8 bytes to the size for some reason
                srcSize += 0x8;
            }

The last item in the archives are 1 byte long (and have a -1 part 4 entry) but their size is actually 1 byte, so this doesn't apply to those items.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant