/* -*-mode:java; c-basic-offset:2; -*- */ import java.io.*; import com.jcraft.jzlib.*; // Test deflate() with small buffers class test_gzip_deflate_inflate{ static final byte[] hello="foo".getBytes(); public static void main(String[] arg){ int err; int comprLen=40000; int uncomprLen=comprLen; byte[] compr=new byte[comprLen]; byte[] uncompr=new byte[uncomprLen]; Deflater deflater = null; try{ deflater = new Deflater(JZlib.Z_DEFAULT_COMPRESSION, JZlib.DEF_WBITS + 16); } catch(GZIPException e){ // never happen, because arguments are valid. } deflater.setInput(hello); deflater.setOutput(compr); while(deflater.total_in!=hello.length && deflater.total_out