public void setBufferSize(int size) { if (size < 64) { throw new IllegalArgumentException("Buffer Size [" + size + "] cannot be less than 64 bytes"); } this.bufferSize = size; this.compress.setBufferSize(bufferSize); this.decompress.setBufferSize(bufferSize); } }
public DeflateCompressionMethod() { /* * Specs specify that head/tail of deflate are not to be present. * * So lets not use the wrapped format of bytes. * * Setting nowrap to true prevents the Deflater from writing the head/tail bytes and the Inflater from expecting the head/tail bytes. */ boolean nowrap = true; this.compress = new DeflaterProcess(nowrap); this.decompress = new InflaterProcess(nowrap); }
public DeflateCompressionMethod() { /* * Specs specify that head/tail of deflate are not to be present. * * So lets not use the wrapped format of bytes. * * Setting nowrap to true prevents the Deflater from writing the head/tail bytes and the Inflater from expecting the head/tail bytes. */ boolean nowrap = true; this.compress = new DeflaterProcess(nowrap); this.decompress = new InflaterProcess(nowrap); }
public void setBufferSize(int size) { if (size < 64) { throw new IllegalArgumentException("Buffer Size [" + size + "] cannot be less than 64 bytes"); } this.bufferSize = size; this.compress.setBufferSize(bufferSize); this.decompress.setBufferSize(bufferSize); } }