lib/bagit.php
private function _isCompressed()
    {
        if (is_dir($this->bag)) {
            return false;
        } else {
            $bag = strtolower($this->bag);
            if (endsWith($bag, '.zip')) {
                $this->bagCompression = 'zip';
                return true;
            } else if (endsWith($bag, '.tar.gz') || endsWith($bag, '.tgz')) {
                $this->bagCompression = 'tgz';
                return true;
            }
        }
        return false;
    }
private function _isCompressed()
    {
        if (is_dir($this->bag)) {
            return false;
        } else {
            $bag = strtolower($this->bag);
            if (endsWith($bag, '.zip')) {
                $this->bagCompression = 'zip';
                return true;
            } else if (endsWith($bag, '.tar.gz') || endsWith($bag, '.tgz')) {
                $this->bagCompression = 'tgz';
                return true;
            }
        }
        return false;
    }
private function _isCompressed ( ) { if ( is_dir ( $ this -> bag ) ) { return false ; } else { $ bag = strtolower ( $ this -> bag ) ; if ( endsWith ( $ bag , '.zip' ) ) { $ this -> bagCompression = 'zip' ; return true ; } else if ( endsWith ( $ bag , '.tar.gz' ) || endsWith ( $ bag , '.tgz' ) ) { $ this -> bagCompression = 'tgz' ; return true ; } } return false ; }
Tests if a bag is compressed

@return True if this is a compressed bag.
Tests if a bag is compressed