Skip to content

Instantly share code, notes, and snippets.

Avatar

Xiaoge Su xis19

  • Apple
  • Sunnyvale, CA
View GitHub Profile
@xis19
xis19 / GzipUtils.java
Created Nov 18, 2019
Demo of GZIPInputStream, GZIPOutputStream + PipedInputStream, PipedOutputStream
View GzipUtils.java
import java.io.IOException;
import java.io.InputStream;
import java.io.PipedInputStream;
import java.io.PipedOutputStream;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.RejectedExecutionException;
import java.util.concurrent.TimeUnit;
import java.util.zip.GZIPInputStream;
import java.util.zip.GZIPOutputStream;