mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-15 08:52:04 +00:00
75b7db858f
- Added more output to zipdir and a -q option to turn it off. - Added -u option to zipdir to only recompress those files in a zip that have changed. - Added -d and -f options to zipdir. -d forces deflate compression, and -f forces a write of the zip, even if it's newer than all the files it contains. - Added support for bzip2 and LZMA compression to zipdir. SVN r1468 (trunk)
74 lines
1.4 KiB
C
74 lines
1.4 KiB
C
#ifndef __W_ZIP
|
|
#define __W_ZIP
|
|
|
|
#pragma pack(push, 1)
|
|
// FZipCentralInfo
|
|
struct FZipEndOfCentralDirectory
|
|
{
|
|
DWORD Magic;
|
|
WORD DiskNumber;
|
|
WORD FirstDisk;
|
|
WORD NumEntries;
|
|
WORD NumEntriesOnAllDisks;
|
|
DWORD DirectorySize;
|
|
DWORD DirectoryOffset;
|
|
WORD ZipCommentLength;
|
|
};
|
|
|
|
// FZipFileInfo
|
|
struct FZipCentralDirectoryInfo
|
|
{
|
|
DWORD Magic;
|
|
BYTE VersionMadeBy[2];
|
|
BYTE VersionToExtract[2];
|
|
WORD Flags;
|
|
WORD Method;
|
|
WORD ModTime;
|
|
WORD ModDate;
|
|
DWORD CRC32;
|
|
DWORD CompressedSize;
|
|
DWORD UncompressedSize;
|
|
WORD NameLength;
|
|
WORD ExtraLength;
|
|
WORD CommentLength;
|
|
WORD StartingDiskNumber;
|
|
WORD InternalAttributes;
|
|
DWORD ExternalAttributes;
|
|
DWORD LocalHeaderOffset;
|
|
// file name and other variable length info follows
|
|
};
|
|
|
|
// FZipLocalHeader
|
|
struct FZipLocalFileHeader
|
|
{
|
|
DWORD Magic;
|
|
BYTE VersionToExtract[2];
|
|
WORD Flags;
|
|
WORD Method;
|
|
WORD ModTime;
|
|
WORD ModDate;
|
|
DWORD CRC32;
|
|
DWORD CompressedSize;
|
|
DWORD UncompressedSize;
|
|
WORD NameLength;
|
|
WORD ExtraLength;
|
|
// file name and other variable length info follows
|
|
};
|
|
|
|
|
|
#pragma pack(pop)
|
|
|
|
#define ZIP_LOCALFILE MAKE_ID('P','K',3,4)
|
|
#define ZIP_CENTRALFILE MAKE_ID('P','K',1,2)
|
|
#define ZIP_ENDOFDIR MAKE_ID('P','K',5,6)
|
|
|
|
#define METHOD_STORED 0
|
|
#define METHOD_DEFLATE 8
|
|
#define METHOD_BZIP2 12
|
|
#define METHOD_LZMA 14
|
|
#define METHOD_PPMD 98
|
|
|
|
// File header flags.
|
|
#define ZF_ENCRYPTED 0x1
|
|
|
|
#endif
|