Hello,
I am trying to decompress an (original version) main.dat file, following the instructions at:
https://www.camanis.net/lemmings/files/docs/lemmings_dat_file_format.txt
The length of the first section is 8670 bytes (compressed), incl. 10 bytes for the header.
At position 8670 in main.dat, I find the following bits (in reverse order):
111 00000010 0000000 ...
According to the spec, "111" indicates that the following 8 bits represent an amount of bytes to read + 9.
So, we should have 2 + 9 = 11 bytes to read.
But ... the ldecomp says 13, i.e. 4 + 9 bytes to read.
Am I overlooking something ? Should it be that the next 9 bits indicate the number of bytes to read, like this:
111 000000100 00000000 ...
Or is ldecomp wrong ? Or the spec wrong ?
Any help appreciated.
I am trying to decompress an (original version) main.dat file, following the instructions at:
https://www.camanis.net/lemmings/files/docs/lemmings_dat_file_format.txt
The length of the first section is 8670 bytes (compressed), incl. 10 bytes for the header.
At position 8670 in main.dat, I find the following bits (in reverse order):
111 00000010 0000000 ...
According to the spec, "111" indicates that the following 8 bits represent an amount of bytes to read + 9.
So, we should have 2 + 9 = 11 bytes to read.
But ... the ldecomp says 13, i.e. 4 + 9 bytes to read.
Am I overlooking something ? Should it be that the next 9 bits indicate the number of bytes to read, like this:
111 000000100 00000000 ...
Or is ldecomp wrong ? Or the spec wrong ?
Any help appreciated.