scopatz / w3g

Access Warcraft 3 replay files from Python 2 or 3
Creative Commons Zero v1.0 Universal
45 stars 16 forks source link

[Question] Decompress Replay without Header information #8

Open koin612 opened 5 years ago

koin612 commented 5 years ago

Hey scopatz,

if the first 0x44 bytes are all 0 and so no header information is avaiable, do you think it's possible to decompress the replay? if so how?

thanks!

scopatz commented 5 years ago

Hi @koin612 - that seems like the files is not well formed. Is this for a specific file or all files you are seeing?

koin612 commented 5 years ago

It is for all files. Specially for the TempReplay file the game creates while playing. The goal is to read the hero spells like grubby has in his Overlay. I found a way doing this via memory reading, but I'd like to avoid memory reading :) so what I've found is that wc3 has a buffer for the data and writes it to TempReplay but missing the header. I'd like to parse this file to visualize the hero spells the player has choosen.

scopatz commented 5 years ago

That is interesting. There is probably a way to skip reading the header information if it is not important. You would want to change this function to skip reading in the header: https://github.com/scopatz/w3g/blob/master/w3g.py#L2219

PRs very welcome!