/** * Compresses the input data and fills specified buffer with compressed * data. Returns actual number of bytes of compressed data. A return value * of 0 indicates that {@link #needsInput() needsInput} should be called * in order to determine if more input data is required. * * @param b the buffer for the compressed data * @param off the start offset of the data * @param len the maximum number of bytes of compressed data * @return the actual number of bytes of compressed data written to the * output buffer */ public int deflate(byte[] b, int off, int len ) { return deflateNative(b, len); }
/** * Compresses the input data and fills specified buffer with compressed * data. Returns actual number of bytes of compressed data. A return value * of 0 indicates that {@link #needsInput() needsInput} should be called * in order to determine if more input data is required. * * @param b the buffer for the compressed data * @param off the start offset of the data * @param len the maximum number of bytes of compressed data * @return the actual number of bytes of compressed data written to the * output buffer */ @Override public int deflate(byte[] b, int off, int len ) { return deflateNative(b, len); }