Open polluks opened 4 years ago
If any examples of these archives exist in the wild then I'd love to support them. However, I'm pretty sure there aren't any. I don't really want to support these formats without test archives that can be used for regression testing. If you find any tools that can generate lh2 or lh3, let me know.
these files can be created with unlha32.dll (-jm5 for -lh2-, with file size limit 8KB, and -jm6 for -lh3-) you can use undll.exe (http://k-takata.o.oo7.jp/mysoft/undllexe.html) and rename undll.exe as unlha32.exe and put unlha32.dll (from http://www.madobe.net/archiver/lib/unlha32.html) aside to use.
and created lzh files are test OK with LHA32 2.67.00.
command to create lh2.lzh:
unlha32 a -jm5 lh2.lzh LICENSE.MIT
command to create lh3.lzh:
unlha32 a -jm6 lh3.lzh LICENSE.MIT
lh2-lh3.zip source of LICENSE.MIT: https://raw.githubusercontent.com/theupdateframework/specification/master/LICENSE-MIT.txt
I think I should tag #11 as well
-jm5 for -lh2-, with file size limit 8KB
this limit respects original LH(arc) 1.9x original implementation, but can be bypassed by hex-editing unlha32.dll (I used unlha32.dll v3.00 as example) search "72 03 6a 03 5f 33" and change "72" to "eb" to bypass original file size check.
Any idea why there's an 8KB file size limit?
Any idea why there's an 8KB file size limit?
maybe because of processing power in 1989 is not that capable for generating Dynamic Huffman encoding for larger than 8KB.
lh2
lh1 variant. This method supports 8 KiB sliding window, with support of maximum 256 bytes of matching length. Dynamic Huffman encoding is used.
lh3
lh2 variant with Static Huffman.
https://en.wikipedia.org/wiki/LHA_(file_format)#Canonical_LZH