int readLength = chunk.length + 4; // read with CRC
compressedWithCRC = new byte[readLength];
int bufferRead = 0;
while (bufferRead < readLength)
{
<BUG>int r;</BUG>
try
{
<BUG>r = source.read(compressedWithCRC, bufferRead, readLength - bufferRead);
</BUG>
if (r < 0)

int readLength = chunk.length + 4; // read with CRC
compressedWithCRC = new byte[readLength];
int bufferRead = 0;
while (bufferRead < readLength)
{
try
{
int r = source.read(compressedWithCRC, bufferRead, readLength - bufferRead);
