Refactor archive API#17
Merged
Merged
Conversation
The zlib algorithm cannot be determined if the header is not compressed. The flags must be set after each decompression
… unused field from ArchiveInfo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR refactors the Telltale Archive API, improves internal structure and adds documentation.
ResourceEntry
TelltaleFileEntrytoResourceEntryto match Telltale's namingArchive
ArchiveBasetoArchiveSymbolas an argument rather than passing a rawulongvalueExportAllfunction which exports all files to a folderMetaCryptfunction are not decrypted at all - this is going to be fixed by adding aLegacyStreamclassTTArchive
T3ArchivetoTTArchive.ttarchreader to match Telltale's one. There are some untested cases.ttarchfile from file entries with optional compression and encryptionTtarchiveChunkedDataStreamhelper class to handle compressed archivesTtarchiveChunkedDataStreamshould result in faster extraction speedContainerStream
ContainerStreamto match Telltale'sDataStreamContainerContainerStreamTTArchive2
T3Archive2toTTArchive2.ttarch2reader usingContainerStream.ttarch2file from file entries with optional compression and encryptionContainerStreamimproves the extraction speed by 1600%-1700% (16-17x faster) due to the single cached chunk and utilizingSubStream. Entries must be ordered by their offsets for maximum efficiencyMiscellaneous
ArchiveInfoTODO:
AddMetaStream needs refactoring to add support. Proper support is required for MCOM, MBES and the other encrypted versions.LegacyStreamto handle files with weird FourCC headers, as well as the ability to create themAddCan be added as a separate PR.Oodledecompression. This will require the native binaries for Windows and Linux. Also, the project could be built only against .NET 8/9/10 if one wishes to work with Oodle-compressed archives.ttarchfiles: CSI3 Demo (Legacy), Bone 1 (Legacy + Encrypted), Bone 1 Czech (1), CSI Hard Evidence (2), SamMax S3 (8), TWDS1 (9), CSI: Fatal Conspiracy (8), Wallace (4), Puzzle Agent 2 (9), Poker Night (8), Monkey Island (8)