byte oleHead[] = new byte[4];
oleHead[0] = (byte) ((oledata.length >>> 0) & 0xFF);
oleHead[1] = (byte) ((oledata.length >>> 8) & 0xFF);
oleHead[2] = (byte) ((oledata.length >>> 16) & 0xFF);
oleHead[3] = (byte) ((oledata.length >>> 24) & 0xFF);
xOutput.writeBytes(oleHead);
// Compress the bytes
byte[] output = new byte[oledata.length];
Deflater compresser = new Deflater();
compresser.setInput(oledata);