Sam James wrote:
I think the bootstrappable folks have a tiny xz implementation, so it is
solved for them already.
It seems that the "tiny xz implementation" is the unxz command in
https://github.com/oriansj/mescc-tools-extra/releases/download/Release_1.4.0/mescc-tools-extra-1.4.0.tar.gz
I think this is the most barebones xz decompressor I have ever seen. I hope
this solution is for an experiment only, and won't be put in a production
system. According to lines 23-26 of unxz.c, it has no integrity checking at
all, and silently truncates multistream files:
* For .xz it supports only LZMA2 (no other filters such as BCJ).
* For .lzma it doesn't work with files with 5 <= lc + lp <= 12.
* It doesn't verify checksums (e.g. CRC-32 and CRC-64).
* It extracts the first stream only, and it ignores the index.
For about the same size you can get a complete lzip decompressor with full
integrity checking. Therefore, switching to lzip for bootstrapping seems
like an improvement.
Best regards,
Antonio.