22 fseek($fd, $ThisFileInfo[
'avdataoffset'], SEEK_SET);
23 $SZIPHeader = fread($fd, 6);
24 if (substr($SZIPHeader, 0, 4) !=
'SZ'.
"\x0A\x04") {
25 $ThisFileInfo[
'error'][] =
'Expecting "SZ[x0A][x04]" at offset '.$ThisFileInfo[
'avdataoffset'].
', found "'.substr($SZIPHeader, 0, 4).
'"';
29 $ThisFileInfo[
'fileformat'] =
'szip';
35 $NextBlockID = fread($fd, 2);
36 switch ($NextBlockID) {
41 fseek($fd, 4, SEEK_CUR);
46 $BHheaderdata = fread($fd, $BHheaderbytes);
48 while (strpos($BHheaderdata,
"\x00", $BHheaderoffset) > 0) {
58 $BHdataArray[
'filename'] = substr($BHheaderdata, $BHheaderoffset, strcspn($BHheaderdata,
"\x00"));
59 $BHheaderoffset += (strlen($BHdataArray[
'filename']) + 1);
61 $BHdataArray[
'owner'] = substr($BHheaderdata, $BHheaderoffset, strcspn($BHheaderdata,
"\x00"));
62 $BHheaderoffset += (strlen($BHdataArray[
'owner']) + 1);
64 $BHdataArray[
'group'] = substr($BHheaderdata, $BHheaderoffset, strcspn($BHheaderdata,
"\x00"));
65 $BHheaderoffset += (strlen($BHdataArray[
'group']) + 1);
82 $ThisFileInfo[
'szip'][
'BH'][] = $BHdataArray;