import base64
import zlib
replay = 'C:\\ProgramData\\FAForever\\replays\\10123254-relentless.fafreplay'
f = open(replay,'r')
lines = f.readlines()[1:]
data = base64.b64decode(lines[0])
result = zlib.decompress(data[4:])
f.close()
Statistics: Posted by relent0r — 04 Sep 2019, 06:40
Statistics: Posted by Uveso — 05 Mar 2019, 03:34
Well, that block of C# code adds a 4-byte length to the beginning of the gzip-encoded data, which by definition includes a header and a CRC/length trailer. So of course the PHP functions won't recognize it. Cut out all of that BlockCopy crap.
Not tested, but maybe something like this:
$parse_str = file("111111.fafreplay", FILE_IGNORE_NEW_LINES);
$body= $parse_str[1];
$body_d= base64_decode($body);
$uncompressed = gzuncompress (substr($body_d,4));
Statistics: Posted by MikZZ — 05 Mar 2019, 00:10
Statistics: Posted by MikZZ — 04 Mar 2019, 22:32
$parse_str = file("111111.fafreplay", FILE_IGNORE_NEW_LINES);
$body= $parse_str[1];
$body_d= base64_decode($body);
$uncompressed = gzuncompress ($body_d);
Statistics: Posted by MikZZ — 03 Mar 2019, 22:15