Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: foo_unpack_lha (Read 5678 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

foo_unpack_lha

  • 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.

download

foo_unpack_lha

Reply #1
First, thx for the great plugin 
Second, im here to reporting this plugin problem.
im using fb2k 0.9.4.2 with latest foo_unpack_lha 1.2.

here is the legally downloadable sample, lhz compressed mp3:
http://dl-3.drabbit.net/dl/giga/tbsong_mp3.lzh

fb2k say its an "Unsupported file format", but i can playback this file with xmplay, mplayer, and able to extract it without error.

foo_unpack_lha

Reply #2
Just out of curiosity: Who uses those compression formats?

foo_unpack_lha

Reply #3
[deleted]

foo_unpack_lha

Reply #4
Thx for your explanation, TrNSZ.

foo_unpack_lha

Reply #5
I've uploaded v1.3, which fixes a stupid problem with file buffering, as well as handling file listing and mass extraction from archives with multiple files. (archive_list with p_want_readers)

It should be just great now.