private function _loadPre21DelFile()
    {
        require_once 'Zend/Search/Lucene/Exception.php';
        try {
            // '.del' files always stored in a separate file
            // Segment compound is not used
            $delFile = $this->_directory->getFileObject($this->_name . '.del');

            $byteCount = $delFile->readInt();
            $byteCount = ceil($byteCount/8);
            $bitCount  = $delFile->readInt();

            if ($bitCount == 0) {
                $delBytes = '';
            } else {
                $delBytes = $delFile->readBytes($byteCount);
            }

            if (extension_loaded('bitset')) {
                return $delBytes;
            } else {
                $deletions = array();
                for ($count = 0; $count < $byteCount; $count++) {
                    $byte = ord($delBytes[$count]);
                    for ($bit = 0; $bit < 8; $bit++) {
                        if ($byte & (1<<$bit)) {
                            $deletions[$count*8 + $bit] = 1;
                        }
                    }
                }

                return $deletions;
            }
        } catch(Zend_Search_Lucene_Exception $e) {
            if (strpos($e->getMessage(), 'is not readable') === false) {
                throw new Zend_Search_Lucene_Exception($e->getMessage(), $e->getCode(), $e);
            }
            // There is no deletion file
            $this->_delGen = -1;

            return null;
        }
    }
private function _loadPre21DelFile()
    {
        require_once 'Zend/Search/Lucene/Exception.php';
        try {
            // '.del' files always stored in a separate file
            // Segment compound is not used
            $delFile = $this->_directory->getFileObject($this->_name . '.del');

            $byteCount = $delFile->readInt();
            $byteCount = ceil($byteCount/8);
            $bitCount  = $delFile->readInt();

            if ($bitCount == 0) {
                $delBytes = '';
            } else {
                $delBytes = $delFile->readBytes($byteCount);
            }

            if (extension_loaded('bitset')) {
                return $delBytes;
            } else {
                $deletions = array();
                for ($count = 0; $count < $byteCount; $count++) {
                    $byte = ord($delBytes[$count]);
                    for ($bit = 0; $bit < 8; $bit++) {
                        if ($byte & (1<<$bit)) {
                            $deletions[$count*8 + $bit] = 1;
                        }
                    }
                }

                return $deletions;
            }
        } catch(Zend_Search_Lucene_Exception $e) {
            if (strpos($e->getMessage(), 'is not readable') === false) {
                throw new Zend_Search_Lucene_Exception($e->getMessage(), $e->getCode(), $e);
            }
            // There is no deletion file
            $this->_delGen = -1;

            return null;
        }
    }
private function _loadPre21DelFile ( ) { require_once 'Zend/Search/Lucene/Exception.php' ; try { // '.del' files always stored in a separate file // Segment compound is not used $ delFile = $ this -> _directory -> getFileObject ( $ this -> _name . '.del' ) ; $ byteCount = $ delFile -> readInt ( ) ; $ byteCount = ceil ( $ byteCount / 8 ) ; $ bitCount = $ delFile -> readInt ( ) ; if ( $ bitCount == 0 ) { $ delBytes = '' ; } else { $ delBytes = $ delFile -> readBytes ( $ byteCount ) ; } if ( extension_loaded ( 'bitset' ) ) { return $ delBytes ; } else { $ deletions = array ( ) ; for ( $ count = 0 ; $ count < $ byteCount ; $ count ++ ) { $ byte = ord ( $ delBytes [ $ count ] ) ; for ( $ bit = 0 ; $ bit < 8 ; $ bit ++ ) { if ( $ byte & ( 1 << $ bit ) ) { $ deletions [ $ count * 8 + $ bit ] = 1 ; } } } return $ deletions ; } } catch ( Zend_Search_Lucene_Exception $ e ) { if ( strpos ( $ e -> getMessage ( ) , 'is not readable' ) === false ) { throw new Zend_Search_Lucene_Exception ( $ e -> getMessage ( ) , $ e -> getCode ( ) , $ e ) ; } // There is no deletion file $ this -> _delGen = - 1 ; return null ; } }
Load pre-2.1 detetions file

Returns bitset or an array depending on bitset extension availability

@return mixed
@throws Zend_Search_Lucene_Exception
Load pre - 2 . 1 detetions file