vault/classes/CompressionHandler.php
public function TryEverything()
    {
        /** Fetch original data state. */
        $Original = $this->Data;

        /** For tracking errors. */
        $Errors = &$this->Errors;

        /**
         * Seeing as we're effectively guessing which compression format has
         * been used, and possibly it mightn't be compressed at all, there'll
         * probably be warnings and notices generated. So, let's handle that
         * cleanly.
         */
        set_error_handler(function ($errno, $errstr, $errfile, $errline) use (&$Errors) {
            $Errors[] = [$errno, $errstr, $errfile, $errline];
        });

        /** Loop until data state doesn't change anymore. */
        while (true) {
            if ($this->TryGz() === 0) {
                continue;
            }
            if ($this->TryBz() === 0) {
                continue;
            }
            if ($this->TryLzf() === 0) {
                continue;
            }
            break;
        }

        /** We're done guessing, so we'll restore the previous error handler. */
        restore_error_handler();

        /**
         * Compare original data state against current data state, and return
         * whether they're the same or different. If the same, then data
         * probably wasn't compressed to begin with.
         */
         return ($Original === $this->Data);
    }
public function TryEverything()
    {
        /** Fetch original data state. */
        $Original = $this->Data;

        /** For tracking errors. */
        $Errors = &$this->Errors;

        /**
         * Seeing as we're effectively guessing which compression format has
         * been used, and possibly it mightn't be compressed at all, there'll
         * probably be warnings and notices generated. So, let's handle that
         * cleanly.
         */
        set_error_handler(function ($errno, $errstr, $errfile, $errline) use (&$Errors) {
            $Errors[] = [$errno, $errstr, $errfile, $errline];
        });

        /** Loop until data state doesn't change anymore. */
        while (true) {
            if ($this->TryGz() === 0) {
                continue;
            }
            if ($this->TryBz() === 0) {
                continue;
            }
            if ($this->TryLzf() === 0) {
                continue;
            }
            break;
        }

        /** We're done guessing, so we'll restore the previous error handler. */
        restore_error_handler();

        /**
         * Compare original data state against current data state, and return
         * whether they're the same or different. If the same, then data
         * probably wasn't compressed to begin with.
         */
         return ($Original === $this->Data);
    }
public function TryEverything ( ) { /** Fetch original data state. */ $ Original = $ this -> Data ; /** For tracking errors. */ $ Errors = & $ this -> Errors ; /**
         * Seeing as we're effectively guessing which compression format has
         * been used, and possibly it mightn't be compressed at all, there'll
         * probably be warnings and notices generated. So, let's handle that
         * cleanly.
         */ set_error_handler ( function ( $ errno , $ errstr , $ errfile , $ errline ) use ( & $ Errors ) { $ Errors [ ] = [ $ errno , $ errstr , $ errfile , $ errline ] ; } ) ; /** Loop until data state doesn't change anymore. */ while ( true ) { if ( $ this -> TryGz ( ) === 0 ) { continue ; } if ( $ this -> TryBz ( ) === 0 ) { continue ; } if ( $ this -> TryLzf ( ) === 0 ) { continue ; } break ; } /** We're done guessing, so we'll restore the previous error handler. */ restore_error_handler ( ) ; /**
         * Compare original data state against current data state, and return
         * whether they're the same or different. If the same, then data
         * probably wasn't compressed to begin with.
         */ return ( $ Original === $ this -> Data ) ; }
Try everything.
Try everything .