Hello, Phoenix uses LZSS compression algorithm by Haruhiko

Hello,

Phoenix uses LZSS compression algorithm by Haruhiko Okumura. LZHUF/LHA compression used in AMI and Award is coded by another Japanese programmer with LZSS as the basis but the back-end was changed to Huffman coding instead of arithmetic coding (in LZSS). Unfortunately the LHA source code (on the web) is rather cryptic. Okumura in his paper said it was an adaptive Huffman algorithm, unfortunately it's only "partially" true because LHA implemented the adaptive Huffman algorithm by using some sort of table created from statistics of the bit-length in the input Lempel-Zif block.

Anyway, some Coreboot (formerly Linux BIOS) guys coded a decompressor for AMI, Award and Phoenix BIOS. I'm not aware of it when I wrote my AMI BIOS 1B module utilities. Strangely, I stumbled upon it yesterday. You can see the code at: cgit.freedesktop.org/~libv/bios_extract/. Unfortunately, their utility cannot put back a modified 1B component into a valid 1B file. I mean they don't make something like my ami_1B_combiner. So, I'll stick to my own utility.