code: public function getStream($stream)
      {
          if ($stream === null) {
              return null;
          }
  
          $streamData = '';
  
          if ($this->props[$stream]['size'] < self::SMALL_BLOCK_THRESHOLD) {
              $rootdata = $this->_readData($this->props[$this->rootentry]['startBlock']);
  
              $block = $this->props[$stream]['startBlock'];
  
              while ($block != -2) {
                  $pos = $block * self::SMALL_BLOCK_SIZE;
                  $streamData .= substr($rootdata, $pos, self::SMALL_BLOCK_SIZE);
  
                  $block = self::getInt4d($this->smallBlockChain, $block * 4);
              }
  
              return $streamData;
          }
          $numBlocks = $this->props[$stream]['size'] / self::BIG_BLOCK_SIZE;
          if ($this->props[$stream]['size'] % self::BIG_BLOCK_SIZE != 0) {
              ++$numBlocks;
          }
  
          if ($numBlocks == 0) {
              return '';
          }
  
          $block = $this->props[$stream]['startBlock'];
  
          while ($block != -2) {
              $pos = ($block + 1) * self::BIG_BLOCK_SIZE;
              $streamData .= substr($this->data, $pos, self::BIG_BLOCK_SIZE);
              $block = self::getInt4d($this->bigBlockChain, $block * 4);
          }
  
          return $streamData;
      }
docs: Extract binary stream data.
  
  @param int $stream
  
  @return string