private function extractFile($info)
    {
        if (0 === $info['size']) {
            return '';
        }

        $data = $this->read($info['compressed_size']);

        if ($info['flags'] & self::GZ) {
            if (false === ($data = gzinflate($data))) {
                throw new RuntimeException(
                    sprintf(
                        'The "%s" file could not be inflated (gzip) from "%s".',
                        $info['path'],
                        $this->file
                    )
                );
            }
        } elseif ($info['flags'] & self::BZ2) {
            if (false === ($data = bzdecompress($data))) {
                throw new RuntimeException(
                    sprintf(
                        'The "%s" file could not be inflated (bzip2) from "%s".',
                        $info['path'],
                        $this->file
                    )
                );
            }
        }

        if (($actual = strlen($data)) !== $info['size']) {
            throw new UnexpectedValueException(
                sprintf(
                    'The size of "%s" (%d) did not match what was expected (%d) in "%s".',
                    $info['path'],
                    $actual,
                    $info['size'],
                    $this->file
                )
            );
        }

        $crc32 = sprintf('%u', crc32($data) & 0xffffffff);

        if ($info['crc32'] != $crc32) {
            throw new UnexpectedValueException(
                sprintf(
                    'The crc32 checksum (%s) for "%s" did not match what was expected (%s) in "%s".',
                    $crc32,
                    $info['path'],
                    $info['crc32'],
                    $this->file
                )
            );
        }

        return $data;
    }