DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
#include "msgCore.h"
#include "nsIAsyncInputStream.h"
#include "nsIInputStream.h"
#include "nsCOMPtr.h"
#include "nsAutoPtr.h"
#include "zlib.h"

class NS_MSG_BASE nsMsgCompressIStream : public nsIAsyncInputStream
{
public:
  nsMsgCompressIStream();
  ~nsMsgCompressIStream();

  NS_DECL_ISUPPORTS
    
  NS_DECL_NSIINPUTSTREAM
  NS_DECL_NSIASYNCINPUTSTREAM

  nsresult InitInputStream(nsIInputStream *rawStream);

protected:
  nsresult DoInflation();
  nsCOMPtr<nsIInputStream> m_iStream;
  nsAutoArrayPtr<char> m_zbuf;
  nsAutoArrayPtr<char> m_databuf;
  char *m_dataptr;
  PRUint32 m_dataleft;
  bool m_inflateAgain;
  z_stream m_zstream;
};