Zip together the iterators until one of them runs out of values.
Each array of values is combined into a single value using the supplied zipFunction function.

@param c
@param zipFunction
@return
322605
@SuppressWarnings("resource")
    public static <R> Stream<R> zip(final Collection<? extends ByteStream> c, final ByteNFunction<R> zipFunction) {
        if (N.isNullOrEmpty(c)) {
            return Stream.empty();
        }

        final int len = c.size();
        final ByteIterator[] iters = new ByteIterator[len];
        int i = 0;

        for (ByteStream s : c) {
            iters[i++] = s.iteratorEx();
        }

        return new IteratorStream<>(new ObjIteratorEx<R>() {
            @Override
            public boolean hasNext() {
                for (int i = 0; i < len; i++) {
                    if (iters[i].hasNext() == false) {
                        return false;
                    }
                }

                return true;
            }

            @Override
            public R next() {
                final byte[] args = new byte[len];

                for (int i = 0; i < len; i++) {
                    args[i] = iters[i].nextByte();
                }

                return zipFunction.apply(args);
            }
        }).onClose(newCloseHandler(c));
    }
153270
@Override
    public <T2, R> CompletableFutureT<W, R> zip(BiFunction<? super T, ? super T2, ? extends R> fn, Publisher<? extends T2> publisher) {

        return (CompletableFutureT<W, R>)super.zip(fn, publisher);
    }
32558
public static <A, B, R> Stream<R> zip(final Collection<? extends A> a, final Collection<? extends B> b,
            final BiFunction<? super A, ? super B, R> zipFunction) {
        return zip(a.iterator(), b.iterator(), zipFunction);
    }
513637
@Override
    public <B> Lazy<Compose<F, G, B>> lazyZip(
            Lazy<? extends Applicative<Function<? super A, ? extends B>, Compose<F, G, ?>>> lazyAppFn) {
        @SuppressWarnings("RedundantTypeArguments")
        Lazy<Applicative<Applicative<Function<? super A, ? extends B>, G>, F>> lazyAppFnCoerced =
                lazyAppFn
                        .<Compose<F, G, Function<? super A, ? extends B>>>fmap(
                                Applicative<Function<? super A, ? extends B>, Compose<F, G, ?>>::coerce)
                        .fmap(Compose<F, G, Function<? super A, ? extends B>>::getCompose);

        return fga.<Applicative<A, G>>fmap(upcast())
                .<Applicative<B, G>>lazyZip(lazyAppFnCoerced.fmap(fgf -> fgf.fmap(gf -> ga -> ga.zip(gf))))
                .fmap(Compose::new);
    }
56697
@Override
    public <I> Lazy<Choice8<A, B, C, D, E, F, G, I>> lazyZip(
            Lazy<? extends Applicative<Function<? super H, ? extends I>, Choice8<A, B, C, D, E, F, G, ?>>> lazyAppFn) {
        return match(a -> lazy(a(a)),
                     b -> lazy(b(b)),
                     c -> lazy(c(c)),
                     d -> lazy(d(d)),
                     e -> lazy(e(e)),
                     f -> lazy(f(f)),
                     g -> lazy(g(g)),
                     h -> lazyAppFn.fmap(choiceF -> choiceF.<I>fmap(f -> f.apply(h)).coerce()));
    }
843803
@SuppressWarnings("unchecked")
    public static <T> List<List<T>> zip(final List<T> ... lists) {
        final List<List<T>> zipped = newArrayList();
        each(Arrays.asList(lists), new Consumer<List<T>>() {
            @Override
            public void accept(final List<T> list) {
                int index = 0;
                for (T elem : list) {
                    final List<T> nTuple = index >= zipped.size() ? U.<T>newArrayList() : zipped.get(index);
                    if (index >= zipped.size()) {
                        zipped.add(nTuple);
                    }
                    index += 1;
                    nTuple.add(elem);
                }
            }
        });
        return zipped;
    }
485814
public static <K, V> Map<K, V> zipMapPartial(Iterable<K> keys, Iterable<V> values)
  {
    Map<K, V> retVal = new LinkedHashMap<>();

    Iterator<K> keysIter = keys.iterator();
    Iterator<V> valsIter = values.iterator();

    while (keysIter.hasNext()) {
      final K key = keysIter.next();

      if(valsIter.hasNext()) retVal.put(key, valsIter.next());
      else break;
    }

    return retVal;
  }
900308
public static File zip(File zipFile, String[] paths, InputStream[] ins, Charset charset) throws UtilException {
		if (ArrayUtil.isEmpty(paths) || ArrayUtil.isEmpty(ins)) {
			throw new IllegalArgumentException("Paths or ins is empty !");
		}
		if (paths.length != ins.length) {
			throw new IllegalArgumentException("Paths length is not equals to ins length !");
		}

		ZipOutputStream out = null;
		try {
			out = getZipOutputStream(zipFile, charset);
			for (int i = 0; i < paths.length; i++) {
				addFile(ins[i], paths[i], out);
			}
		} finally {
			IoUtil.close(out);
		}
		return zipFile;
	}
940444
function zipProto() {
    var observables = [];
    for (var _i = 0; _i < arguments.length; _i++) {
        observables[_i - 0] = arguments[_i];
    }
    return this.lift.call(zipStatic.apply(void 0, [this].concat(observables)));
}
735480
public <T2, R> ValueTransformer<W,R> zip(Iterable<? extends T2> iterable,
            BiFunction<? super T, ? super T2, ? extends R> fn) {
        return this.unitAnyM(this.transformerStream().map(v->v.zip(iterable,fn)));
    }
107909
public static <T1, T2, R> ReactiveSeq<R> zip(final Stream<T1> left, final Stream<T2> right, final BiFunction<? super T1, ? super T2, ? extends R> zipper) {
        final Iterator<T1> it1 = left.iterator();
        final Iterator<T2> it2 = right.iterator();

        class Zip implements Iterator<R> {
            @Override
            public boolean hasNext() {
                if (!it1.hasNext()) {
                    close(it2);
                }
                if (!it2.hasNext()) {
                    close(it1);
                }
                return it1.hasNext() && it2.hasNext();
            }

            @Override
            public R next() {
                return zipper.apply(it1.next(), it2.next());
            }
        }

        return ReactiveSeq.fromIterator(new Zip())
                  .onClose(() -> {
                      left.close();
                      right.close();
                  });
    }
813165
public static <R> Stream<R> zip(final ShortIterator a, final ShortIterator b, final ShortBiFunction<R> zipFunction) {
        return new IteratorStream<>(new ObjIteratorEx<R>() {
            @Override
            public boolean hasNext() {
                return a.hasNext() && b.hasNext();
            }

            @Override
            public R next() {
                return zipFunction.apply(a.nextShort(), b.nextShort());
            }
        });
    }
380992
public static <R> Stream<R> zip(final float[] a, final float[] b, final float[] c, final FloatTriFunction<R> zipFunction) {
        return zip(FloatIteratorEx.of(a), FloatIteratorEx.of(b), FloatIteratorEx.of(c), zipFunction);
    }
187155
public static List<String> unzip(final File zipFile, final String destination, String encoding) {
    List<String> fileNames = CollectUtils.newArrayList();
    String dest = destination;
    if (!destination.endsWith(File.separator)) {
      dest = destination + File.separator;
    }
    ZipFile file;
    try {
      file = null;
      if (null == encoding) file = new ZipFile(zipFile);
      else file = new ZipFile(zipFile, encoding);
      Enumeration<ZipArchiveEntry> en = file.getEntries();
      ZipArchiveEntry ze = null;
      while (en.hasMoreElements()) {
        ze = en.nextElement();
        File f = new File(dest, ze.getName());
        if (ze.isDirectory()) {
          f.mkdirs();
          continue;
        } else {
          f.getParentFile().mkdirs();
          InputStream is = file.getInputStream(ze);
          OutputStream os = new FileOutputStream(f);
          IOs.copy(is, os);
          is.close();
          os.close();
          fileNames.add(f.getAbsolutePath());
        }
      }
      file.close();
    } catch (IOException e) {
      e.printStackTrace();
    }
    return fileNames;
  }
591934
public static <T extends Comparable<T>> void bucketSort(final List<T> c) {
        Array.bucketSort(c);
    }
412832
public static <T, R> Stream<R> parallelZipp(final Collection<? extends Iterator<? extends T>> c, final Function<? super List<? extends T>, R> zipFunction) {
        return parallelZipp(c, zipFunction, DEFAULT_QUEUE_SIZE_PER_ITERATOR);
    }
278086
final public static function zipWith()
    {
        $xss = func_get_args();
        $f = array_pop($xss);
        $zipped = static::unzip($xss);
        return static::map($zipped, function($xs, $i, $xss) use ($f) {
            return call_user_func_array($f, $xs);
        });
    }