maxReadCount = count > FOUR_K ? FOUR_K : count;
maxReadCount = count > 4096 ? 4096 : count;
nsFolderCompactState::OnDataAvailable(nsIChannel *channel, nsISupports *ctxt,                                      nsIInputStream *inStr,                                       PRUint32 sourceOffset, PRUint32 count){  nsresult rv = NS_ERROR_FAILURE;  if (!m_fileStream || !inStr) return rv;  PRUint32 maxReadCount, readCount, writeCount;  rv = NS_OK;  while (NS_SUCCEEDED(rv) && (PRInt32) count > 0)  {    maxReadCount = count > FOUR_K ? FOUR_K : count;    rv = inStr->Read(m_dataBuffer, maxReadCount, &readCount);    if (NS_SUCCEEDED(rv))    {      writeCount = m_fileStream->write(m_dataBuffer, readCount);      count -= readCount;      NS_ASSERTION (writeCount == readCount,                     "Oops, write fail, folder can be corrupted!\n");    }  }  return rv;}