Yngvarr

Generation

generate functionSat, 07 Jan 2023

gzencode and stream http archive

function gzencode_http_zip($gzdata){ $gzsize = strlen($gzdata); $gzcrc = crc32($gzdata); $gzdata = gzcompress($gzdata,9); $gzdata = substr($gzdata,0,strlen($gzdata)-4); $rawdata = "\x1f\x8b\x08\x00\x00\x00\x00\x00".$gzdata."\x00\xff\xff".pack('V',$gzcrc).pack('V',$gzsize); return $rawdata; }

Questions about programming?Chat with your personal AI assistant