Java Deflater always returning 0 issue
<p>So I have a input stream from which I read a smaller fixed-size buffer which I'm trying to Deflate inside a Runnable class.</p>

<pre><code>randomClass implements Runnable {
    public void run() {
        ...
        byte[] output = new Byte[FIXED];
        Deflater deflater = new Deflater();
        deflater.setInput(uncompressed);
        deflater.setLevel(Deflater.DEFLATED);
        int length = deflater.deflate(output);
        ...
    } 
}
</code></pre>

<p>The issue I'm running into is that length is always returning 0 which means I need more input according to the doc? However, I've checked that the uncompressed is not null. How can I get the bytes out of the output?</p>

<p>Also I believe I should be calling deflater.finish() only at the last block. Is this correct?</p>
