Subj.
Your script unpacks SOME files from LS22 without any problems.
But some files have zero-fill instead of "All you can eat" sign-phrase in header.
If I hex-edit file to add this line back to its place, edited file is also unpacked no problem.
So problem is only with file format detection, not unpacking itself.