Hey guys. I have a request that would probably be pretty easy for some of you, so would be cool if you can assist!
I have a small file
from PS3. It looks like lz77 but I was not able to properly
decompress it with the algorithms I've found online.
So here are my questions:
Is this really lz77 or it is a common variation that has some specific name?
Is there a code somewhere that can properly
decompress this file? Preferably not C++, "bare" and as a single function. I'd like to see a code without any frills not required to perform the actual decompression because I am mainly interested in understanding
how to decompress this file.
If decompression solution will be found, in case I want to create a fake-compressed file that would work when fed to a compliant decoder, what would a stream of such a file look like?
Would it be something like this: [uncompsize-long]FFdata-here-data-hereFFdata-here-data-here-and-more-dataFFeven-more-data ?
I'd like to know what exactly these "inserted" bytes would be, would they always be the same, how often they should occur and what are the "rules" of adding them in general?
Provided file has a header of 4 bytes that looks like an uncompressed size.
I don't know where the actual compressed data starts. In other words I am not 100% positive that there is no some kind of additional header beyond 1st 4 bytes and what may look like a header may in fact be the header of an uncompressed file and thus not relevant.
The very last human-readable sentence in file should
be something like this "ことも好き" (sjis). I suspect that if it would be possible to obtain it, the result can be declared correct.
EDIT:never mind I am stoopid. It is not lz77, it is classical lzss. Still curious about bonus question though!