Usage: unzip <remotepath> [<subpath> [<start> [<limit>]]]
424217
def unzip(self, remotepath, subpath = '/', start = 0, limit = 1000):
		''' '''
		rpath = get_pcs_path(remotepath)
		return self.__panapi_unzip_file(rpath, subpath, start, limit);
697291
def file_unzipper(directory):
   
   debug.log("Unzipping directory (%s)..."%directory)
   #FINDING AND UNZIPPING ZIPPED FILES
   for root, dirs, files in os.walk(directory, topdown=False):
      if root != "":
         orig_dir = os.getcwd()
         os.chdir(directory)
         Popen('gunzip -q -f *.gz > /dev/null 2>&1', shell=True).wait()
         Popen('unzip -qq -o "*.zip" > /dev/null 2>&1', shell=True).wait()
         Popen('rm -f *.zip > /dev/null 2>&1', shell=True).wait()
         os.chdir(orig_dir)
735611
def _unzip_file(self, zip_file, out_folder):
        
        try:
            zf = zipfile.ZipFile(zip_file, 'r')
            zf.extractall(path=out_folder)
            zf.close()
            del zf
            return True
        except:
            return False
62977
def unzip_one(local_file_name):
    
    local_file_name = op.expanduser(local_file_name)
    destination = op.dirname(local_file_name)
    datafile = zipfile.ZipFile(local_file_name)
    namelist = datafile.namelist()
    datafile.extractall(destination)
    datafile.close()
    remove(local_file_name)

    fullnamelist = []
    for fn in namelist:
        fullnamelist.append(op.join(destination, fn))
    return fullnamelist
670866
def unarchive(self, target_path=None, zip_path=None):
        
        if target_path:
            self.target_path = target_path

        if zip_path:
            self.zip_path = zip_path

        if self.has_path is False:
            raise RuntimeError("")

        if os.path.isdir(self.target_path) is False:
            os.mkdir(self.target_path)

        with zipfile.ZipFile(self.zip_path, 'r') as zip:
            zip.extractall(self.target_path)
581742
function unzipNodeTarball(next) {
        var onError = function(err) {
          console.log(err.stack);
          _log('error', 'failed to extract the node source');
          process.exit(1);
        };

        if (isWin) {
          _log('extracting the node source [node-tar.gz]');

          // tar-stream method w/ gunzip-maybe
          var read = fs.createReadStream(nodeFilePath);
          var extract = tarstream.extract();
          var basedir = nodeFileDir;

          if (!fs.existsSync(nodeFileDir)) {
            fs.mkdirSync(nodeFileDir);
          }

          extract.on('entry', function(header, stream, callback) {
            // header is the tar header
            // stream is the content body (might be an empty stream)
            // call next when you are done with this entry

            var absolutepath = path.join(basedir, header.name);
            if (header.type === 'directory') {
              // handle directories.
              // console.log('dir:', header.name);
              fs.mkdirSync(absolutepath);
              return callback();
            } else if (header.type === 'file') {
              // handle files
              // console.log('file:', header.name);
            } else {
              console.log(header.type + ':', header.name);
              _log('warn', 'unhandled type in tar extraction, skipping');
              return callback();
            }

            var write = fs.createWriteStream(absolutepath);

            stream.pipe(write);

            write.on('close', function() {
              return callback();
            });

            stream.on('error', function(err) {
              return onError(err);
            });

            write.on('error', function(err) {
              return onError(err);
            });

            stream.resume(); // just auto drain the stream
          });

          extract.on('finish', function() {
            _log('extraction finished');
            return next();
          });

          read.pipe(gunzip()).pipe(extract);
        } else {
          _log('extracting the node source [native tar]');

          var cmd = ['tar', '-xf', nodeFilePath, '-C', nodeFileDir];
          _log(cmd.join(' '));

          var tar = spawn(cmd.shift(), cmd);
          tar.stdout.pipe(process.stdout);
          tar.stderr.pipe(process.stderr);

          tar.on('close', function() {
            return next();
          });
          tar.on('error', onError);
        }
      }
943379
function unzip(src, target, fn) {
    fs
        .createReadStream(src)
        .pipe(Unzip.Extract({path: target}))
        .on('close', fn || function(){})
}
213168
private static InputStreamReader decompressWith7Zip(final String archivePath)
		throws ConfigurationException
	{
		PATH_PROGRAM_7ZIP = (String) config
					.getConfigParameter(ConfigurationKeys.PATH_PROGRAM_7ZIP);

		if (PATH_PROGRAM_7ZIP == null) {
			throw ErrorFactory
					.createConfigurationException(ErrorKeys.CONFIGURATION_PARAMETER_UNDEFINED);
		}

		try {
			Runtime runtime = Runtime.getRuntime();
			Process p = runtime.exec(PATH_PROGRAM_7ZIP + " e " + archivePath
					+ " -so");

			return new InputStreamReader(p.getInputStream(), WIKIPEDIA_ENCODING);

		}
		catch (Exception e) {
			throw new RuntimeException(e);
		}
	}
1147771
def remotes(path = Dir.pwd)
      g = MiniGit.new(path)
      g.capturing.remote.split
    end
956058
public static long unzipNoGuava(
      final Path zip,
      final Configuration configuration,
      final File outDir,
      final Progressable progressable,
      final RetryPolicy retryPolicy
  ) throws IOException
  {
    final RetryPolicy effectiveRetryPolicy;
    if (retryPolicy == null) {
      effectiveRetryPolicy = RetryPolicies.exponentialBackoffRetry(
          NUM_RETRIES,
          SECONDS_BETWEEN_RETRIES,
          TimeUnit.SECONDS
      );
    } else {
      effectiveRetryPolicy = retryPolicy;
    }

    final DataPusher zipPusher = (DataPusher) RetryProxy.create(
        DataPusher.class,
        new DataPusher()
        {
          @Override
          public long push() throws IOException
          {
            try {
              final FileSystem fileSystem = zip.getFileSystem(configuration);
              long size = 0L;
              final byte[] buffer = new byte[1 << 13];
              progressable.progress();
              try (ZipInputStream in = new ZipInputStream(fileSystem.open(zip, 1 << 13))) {
                for (ZipEntry entry = in.getNextEntry(); entry != null; entry = in.getNextEntry()) {
                  final String fileName = entry.getName();
                  final String outputPath = new File(outDir, fileName).getAbsolutePath();

                  CompressionUtils.validateZipOutputFile(zip.getName(), new File(outputPath), outDir);

                  try (final OutputStream out = new BufferedOutputStream(new FileOutputStream(outputPath))) {
                    for (int len = in.read(buffer); len >= 0; len = in.read(buffer)) {
                      progressable.progress();
                      if (len == 0) {
                        continue;
                      }
                      size += len;
                      out.write(buffer, 0, len);
                    }
                    out.flush();
                  }
                }
              }
              progressable.progress();
              return size;
            }
            catch (IOException | RuntimeException exception) {
              log.error(exception, "Exception in unzip retry loop");
              throw exception;
            }
          }
        },
        effectiveRetryPolicy
    );
    return zipPusher.push();
  }
1173364
def unzip(filename, root, verbose=True):
  
  for message in _unzip_iter(filename, root, verbose):
    if isinstance(message, ErrorMessage):
      raise Exception(message)
798823
def _uncompress_file(self, path):
        '''
        
        '''

        with self.file.open('rb') as f:
            if (self.cdfversion == 3):
                data_start, data_size, cType, _ = self._read_ccr(8)
            else:
                data_start, data_size, cType, _ = self._read_ccr2(8)

            if cType != 5:
                return
            f.seek(data_start)
            decompressed_data = gzip.decompress(f.read(data_size))

        newpath = pathlib.Path(tempfile.NamedTemporaryFile(suffix='.cdf').name)
        with newpath.open('wb') as g:
            g.write(bytearray.fromhex('cdf30001'))
            g.write(bytearray.fromhex('0000ffff'))
            g.write(decompressed_data)

        return newpath
237274
def restore(self, remotepath):
		''' 
		'''
		rpath = get_pcs_path(remotepath)
		# by default, only 1000 items, more than that sounds a bit crazy
		pars = {
			'method' : 'listrecycle' }

		self.pd("Searching for fs_id to restore")
		return self.__get(pcsurl + 'file', pars, self.__restore_search_act, rpath)
271493
def unzip(filename):
        
        with zipfile.ZipFile(filename, "r") as zip_ref:
            zip_ref.extractall(Spark.svm_path())
        return True
762957
private String splitNameWithoutGzipExtension(String split)
            throws IOException {
        if (split == null) {
            throw new IOException("Path is not a split");
        }
        if (split.endsWith(".gz")) {
            return split.substring(0, split.length() - 3);
        }
        return split;
    }
957092
def _unpack(self):
        
        if self._ext == 'zip':
            with ZipFile(self._local, 'r') as archive:
                archive.extractall(self._root)
        else:
            cmd = 'gunzip | tar xC ' + self._root
            proc = subprocess.Popen(cmd, shell=True, stdin=subprocess.PIPE)
            proc.stdin.write(self._local.read())
        self._local.close()
269880
def splitpath(path):
    """"""
    c = []
    head, tail = os.path.split(path)
    while tail:
        c.insert(0, tail)
        head, tail = os.path.split(head)
    return c