Here you can find the source of decompressBytes(byte bytess[][])
public static byte[] decompressBytes(byte bytess[][]) throws IOException
//package com.java2s; /* This file is part of VoltDB. * Copyright (C) 2008-2011 VoltDB Inc.//from w ww . java 2s . co m * * VoltDB is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * VoltDB is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with VoltDB. If not, see <http://www.gnu.org/licenses/>. */ import java.io.*; import java.util.zip.*; public class Main { public static byte[] decompressBytes(byte bytess[][]) throws IOException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); for (byte bytes[] : bytess) { baos.write(bytes); } ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); baos = new ByteArrayOutputStream(); GZIPInputStream gis = new GZIPInputStream(bais); byte bytes[] = new byte[1024 * 8]; while (true) { int read = gis.read(bytes); if (read == -1) { break; } baos.write(bytes, 0, read); } return baos.toByteArray(); } }