Signed-off-by: Roland Häder <haeder@hmmdeutschland.de>
$timer = microtime(TRUE);
// Flush data
- file_put_contents(CHECK_POINT, $GLOBALS['total_blocks'] . ':' . $GLOBALS['total_hashes'] . ':' . $GLOBALS['cycles'] . ':' . base64_encode($nonce) . ':' . $modulaHash . ':' . base64_encode(serialize($GLOBALS['found_hashes'])));
+ file_put_contents(CHECK_POINT, $GLOBALS['total_blocks'] . ':' . $GLOBALS['total_hashes'] . ':' . $GLOBALS['cycles'] . ':' . base64_encode($nonce) . ':' . $modulaHash . ':' . base64_encode(gzcompress(serialize($GLOBALS['found_hashes']))));
// Set time
$GLOBALS['time_flush'] = microtime(TRUE);
$GLOBALS['cycles'] = intval($data[2]);
$nonce = base64_decode($data[3]);
$modulaHash = $data[4];
- $GLOBALS['found_hashes'][$GLOBALS['total_blocks']] = unserialize(base64_decode($data[5]));
+ $GLOBALS['found_hashes'][$GLOBALS['total_blocks']] = unserialize(gzuncompress(base64_decode($data[5])));
} else {
// Create nonce (small)
$nonce = 1 / mt_rand();