Back to index

lightning-sunbird  0.9+nobinonly
Defines | Functions | Variables
nsHTTPCompressConv.cpp File Reference
#include "nsHTTPCompressConv.h"
#include "nsMemory.h"
#include "plstr.h"
#include "prlog.h"
#include "nsIChannel.h"
#include "nsCOMPtr.h"
#include "nsReadableUtils.h"
#include "nsIByteArrayInputStream.h"
#include "nsIStringStream.h"

Go to the source code of this file.

Defines

#define ASCII_FLAG   0x01 /* bit 0 set: file probably ascii text */
#define HEAD_CRC   0x02 /* bit 1 set: header CRC present */
#define EXTRA_FIELD   0x04 /* bit 2 set: extra field present */
#define ORIG_NAME   0x08 /* bit 3 set: original file name present */
#define COMMENT   0x10 /* bit 4 set: file comment present */
#define RESERVED   0xE0 /* bits 5..7: reserved */

Functions

static NS_METHOD DiscardSegments (nsIInputStream *input, void *closure, const char *buf, PRUint32 offset, PRUint32 count, PRUint32 *countRead)
nsresult NS_NewHTTPCompressConv (nsHTTPCompressConv **aHTTPCompressConv)

Variables

static unsigned gz_magic [2] = {0x1f, 0x8b}

Define Documentation

#define ASCII_FLAG   0x01 /* bit 0 set: file probably ascii text */

Definition at line 393 of file nsHTTPCompressConv.cpp.

#define COMMENT   0x10 /* bit 4 set: file comment present */

Definition at line 397 of file nsHTTPCompressConv.cpp.

#define EXTRA_FIELD   0x04 /* bit 2 set: extra field present */

Definition at line 395 of file nsHTTPCompressConv.cpp.

#define HEAD_CRC   0x02 /* bit 1 set: header CRC present */

Definition at line 394 of file nsHTTPCompressConv.cpp.

#define ORIG_NAME   0x08 /* bit 3 set: original file name present */

Definition at line 396 of file nsHTTPCompressConv.cpp.

#define RESERVED   0xE0 /* bits 5..7: reserved */

Definition at line 398 of file nsHTTPCompressConv.cpp.


Function Documentation

static NS_METHOD DiscardSegments ( nsIInputStream input,
void closure,
const char *  buf,
PRUint32  offset,
PRUint32  count,
PRUint32 countRead 
) [static]

Definition at line 51 of file nsHTTPCompressConv.cpp.

{
    *countRead = count;
    return NS_OK;
}

Definition at line 548 of file nsHTTPCompressConv.cpp.

{
    NS_PRECONDITION(aHTTPCompressConv != nsnull, "null ptr");

    if (!aHTTPCompressConv)
        return NS_ERROR_NULL_POINTER;

    *aHTTPCompressConv = new nsHTTPCompressConv();

    if (!*aHTTPCompressConv)
        return NS_ERROR_OUT_OF_MEMORY;

    NS_ADDREF(*aHTTPCompressConv);
    return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

unsigned gz_magic[2] = {0x1f, 0x8b} [static]

Definition at line 400 of file nsHTTPCompressConv.cpp.