Open
Conversation
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.
Trim is a compression method that late versions of SEA ARC supported.
The necessary algorithms are mostly already implemented. Trim is mainly a close variant of the LZSS plus adaptive Huffman coding used for the LH1 method in LZH files. The 0x100 symbol from the Huffman code indicates end of file, and 0x101 and up are copy lengths, but copy one byte less than in LH1. Trim, like several other ARC compression methods, uses RLE90 before passing to the next compression stage.
The main difficulty in supporting Trim is that its method number (10) conflicts with that used by Crush in the NoGate Consulting PAK program. The relevant versions of SEA ARC generate a comment record with 20 in the compression method field and an empty string for the file name; NoGate PAK does not generate this record. The patch looks for this record and assumes that method 10 is Trim if the record is found.
Some samples for testing can be found at http://cd.textfiles.com/hof91/LANT/ . LANMODEM.ARC and NETCRACK.ARC are truncated, and NETWATCH.ARC is badly corrupted, but the others unpack when this patch is applied.