### Question:
IOUtil { public static byte[] compressStringZlib(String content) { try { ByteOutputStream bos = new ByteOutputStream(10000); DeflaterOutputStream zos = new DeflaterOutputStream(bos); zos.write(content.getBytes("utf8")); zos.flush(); zos.close(); byte[] fileBytes = new byte[bos.size()]; System.arraycopy(bos.getBytes(), 0, fileBytes, 0, fileBytes.length); return fileBytes; } catch (IOException e) { logger.warn("Failed to zip string.", e); } return null; }  static final void loadClassFromUrl(String urlOrFilePath, String extractDir); static final void extractJAR(String jarFileName, String extractDir); static final void extractJAR(URL jarUrl, String extractDir); static final void extractJAR(File zFile, String extractDir); static final void extractJAR(InputStream is, String extractDir); static byte[] compressString(String entryName, String content); static byte[] compressStringZlib(String content); static String uncompressString(byte[] bytes); static String uncompressStringZlib(byte[] bytes); static final void writeStreamToFile(InputStream is, String fileName); static final byte[] readFileBytes(String fileName); static final byte[] readFileBytes(File file); static final byte[] readStreamBytes(InputStream is); static final String parseFileNameFromString(String absolutePath); static final void copyDir(File sourceDir, File destDir); static final void copyFile(File sourceFile, File destDir);  }### Answer:
@Test public void testCompressStringZlib() throws Exception { String content = "您好, Hello!"; byte[] bytes = IOUtil.compressStringZlib(content); FileOutputStream fos = new FileOutputStream(new File("compress.gz")); fos.write(bytes); fos.close(); String result = IOUtil.uncompressStringZlib(bytes); assertEquals(content, result); }