public static byte[] decodificarBase64YDescomprimirImagen(String imagenBase64) { byte[] imagenEnBytes = null; byte[] imagenDecodificada= Base64.decode(imagenBase64.getBytes()); InputStream is= new ByteArrayInputStream(imagenDecodificada); GZIPInputStream gzipInput=null; try { gzipInput= new GZIPInputStream(is); imagenEnBytes= new byte[1028]; gzipInput.read(imagenEnBytes,0,1028); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } return imagenEnBytes; }