[ Home ]

zipfile.c File Reference

Write zip file. More...

#include <stdio.h>
#include "../common/platform.h"
#include "../common/common_utils.h"
#include "zip.h"

Include dependency graph for zipfile.c:


Defines

#define SIG_LOCAL   0x04034b50L
#define SIG_CENTRAL   0x02014b50L
#define SIG_END   0x06054b50L
#define SIG_EXTENDLOCAL   0x08074b50L
#define SIG_EXTENDSPLOCAL   0x30304b50L
#define LOCALHEAD_SIZE   26
#define CENTRALHEAD_SIZE   42
#define ENDHEAD_SIZE   18

Functions

PUBLIC wtBoolean zip_WriteLocalChunk (zipHead_t *z, FILE *f)
 Write local header to file.
PUBLIC wtBoolean zip_WriteCentralChunk (zipHead_t *z, FILE *f)
 Write central header to file.
PUBLIC wtBoolean zip_WriteEndChunk (W16 num, W32 size, W32 offset, W16 len, char *comment, FILE *f)
 Write end of central directory data to file.

Detailed Description

Write zip file.

Author:
Michael Liebscher
Date:
2004-2005
Note:
Reference document: http://www.pkware.com/company/standards/appnote/appnote.txt

Function Documentation

PUBLIC wtBoolean zip_WriteCentralChunk ( zipHead_t *  z,
FILE *  f 
)

Write central header to file.

Parameters:
[in] z zip entry to write central header for.
[in] f File to write to.
Returns:
On success true, otherwise false.

Here is the caller graph for this function:

PUBLIC wtBoolean zip_WriteEndChunk ( W16  num,
W32  size,
W32  offset,
W16  len,
char *  comment,
FILE *  f 
)

Write end of central directory data to file.

Parameters:
[in] num Number of entries in central directory.
[in] size Size of central directory in bytes.
[in] offset Offset of central directory.
[in] len Length of zip file comment in bytes (0 if none).
[in] comment Zip file comment if len != 0.
[in] f File to write to.
Returns:
On success true, otherwise false.

Here is the caller graph for this function:

PUBLIC wtBoolean zip_WriteLocalChunk ( zipHead_t *  z,
FILE *  f 
)

Write local header to file.

Parameters:
[in] z zip entry to write local header for.
[in] f File to write to.
Returns:
On success true, otherwise false.

Here is the caller graph for this function: