Esempio n. 1
0
 private function parseBlockTable()
 {
     $hashing = new FileKeyHashing();
     $encryptedStream = new EncryptedStream($this->stream, new DefaultEncryption($hashing->hash('(block table)')));
     $parser = new BinaryStreamParser($encryptedStream);
     $parser->seek($this->getUserDataOffset() + $this->getHeader()->getBlockTablePos());
     $blocks = array();
     //		$offsetFix = 0;
     for ($i = 0; $i < $this->getHeader()->getBlockTableSize(); $i++) {
         $block = $blocks[$i] = Block::parse($parser);
         //			if($block->getSize() == 0) {
         //				$offsetFix++;
         //			}
     }
     return new BlockTable($blocks);
 }