Welcome Guest ( Log In | Register )

foo_unpack_lha, for 0.9.x
post May 27 2006, 20:44
Post #1

Group: Admin
Posts: 4723
Joined: 15-December 02
Member No.: 4082

  • Supports .LHA and .LZH files.
  • Supports all current compression schemes (lh0, lh5, lh6, lh7) and older schemes (lh1, lh2, lh3, lh4) as well as lharc schemes. (lzs, lz4, lz5)
  • Full header levels 0, 1, 2, and 3 and extended headers, parsing and verification based on code from lha-1.14i-ac20040929.
  • Filename decoding for names with >7-bit characters supports UTF-8, falling back on Shift-JIS if the name contains any illegal UTF-8 sequences. ( It should be pretty hard to make a sequence of Shift-JIS characters which are also valid UTF-8. ) Let me know if this should fall back on anything more, without complicating the encoding detection too much, since it also has to decode the filenames again for path matching when unpacking for playback.
  • Unpacker service for transparent support in applicable inputs. ( For example, foo_dumb will support LHA archives containing single files, renamed to MOD/MDZ, or actually any other extension it already supports. I kind of walked into this after finding a .IT file on modarchive which was compressed this way, inside of the .ZIP they used for the download. )
This implementation is fairly secure in the limited testing I've done on both working and corrupt archives, after fixing a few problems in the implementation. However, I would be interested in any problem files, should someone manage to break the unpacker.

Feedback on filename and path encoding support would also be useful, since the only thing it currently handles with any intelligence is UTF-8. It also attempts to fall back on a couple of other encodings if there are somehow any illegal multibyte sequences, but I'm not even sure if that works, or if there will be any files using those encoding in the wild.

Go to the top of the page
+Quote Post

Posts in this topic

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:


RSS Lo-Fi Version Time is now: 31st January 2015 - 02:11