struct Core::Zip::CentralDirFileHeader

Overview

File header in central directory. More…

#include <corezipfileformat.h>

struct CentralDirFileHeader
{
    // fields

    uint32 signature;
    uint16 versionMadeBy;
    uint16 versionNeeded;
    uint16 gpBitFlag;
    uint16 compressionMethod;
    uint16 lastModifiedTime;
    uint16 lastModifiedDate;
    uint32 crc32;
    uint32 compressedSize;
    uint32 uncompressedSize;
    uint16 fileNameLength;
    uint16 extraFieldLength;
    uint16 fileCommentLength;
    uint16 startDiskNumber;
    uint16 internalAttributes;
    uint32 externalAttributes;
    uint32 localHeaderOffset;

    // methods

    PROPERTY_FLAG(gpBitFlag, kUTF8Encoded, isUTF8Encoded) bool read(IO bool write(IO::BinaryAccessor& s) const;
    int getAdditionalSize() const;
};

Detailed Documentation

File header in central directory.

Fields

uint32 signature

central file header signature 4 bytes (0x02014b50)

uint16 versionMadeBy

version made by 2 bytes

uint16 versionNeeded

version needed to extract 2 bytes

uint16 gpBitFlag

general purpose bit flag 2 bytes

uint16 compressionMethod

compression method 2 bytes

uint16 lastModifiedTime

last mod file time 2 bytes

uint16 lastModifiedDate

last mod file date 2 bytes

uint32 crc32

crc-32 4 bytes

uint32 compressedSize

compressed size 4 bytes

uint32 uncompressedSize

uncompressed size 4 bytes

uint16 fileNameLength

file name length 2 bytes

uint16 extraFieldLength

extra field length 2 bytes

uint16 fileCommentLength

file comment length 2 bytes

uint16 startDiskNumber

disk number start 2 bytes

uint16 internalAttributes

internal file attributes 2 bytes

uint32 externalAttributes

external file attributes 4 bytes

uint32 localHeaderOffset

relative offset of local header 4 bytes