oStream.close(); // this is necessary for the gzip and base64 streams
}
/* package */ static void decompressStream(InputStream inputStream, OutputStream outputStream) throws IOException {
@SuppressWarnings("resource")
InputStream iStream = new GZIPInputStream(new Base64InputStream(new BufferedInputStream(inputStream), false, -1, null));
OutputStream oStream = new BufferedOutputStream(outputStream);
byte[] buffer = new byte[2048];
int bytesRead;
while ((bytesRead = iStream.read(buffer)) != -1) {
oStream.write(buffer, 0, bytesRead);