/** * 在末尾加入全部index数据 */ public function appendIndexes(Binary &$idat) { $this->index_first = $this->tell(); $bytes = $idat->tell(); if ($bytes === 0) { $idat->seek(0, SEEK_END); $bytes = $idat->tell(); } $idat->seek(0); $position = $this->write($idat->read($bytes)); $index_size = $this->getIndexSize(); $this->index_last = $this->tell() - $index_size; return $this->writeNumber($position, $this->term_size); }