Interface CentralDirectoryRecord

Hierarchy

  • CentralDirectoryRecord

Properties

Properties

data: {
    compressedSize: number;
    compressionMethod: number;
    crc32: number;
    externalFileAttributes: number;
    extraField: ArrayBuffer;
    extraFieldLength: number;
    fileComment: string;
    fileCommentLength: number;
    filename: string;
    filenameLength: number;
    generalPurposeBitFlag: number;
    internalFileAttributes: number;
    lastModifiedDate: number;
    lastModifiedTime: number;
    localFileHeaderRelativeOffset: number;
    signature: ArrayBuffer;
    startingDiskNumber: number;
    uncompressedSize: number;
    versionMadeBy: number;
    versionToExtract: number;
}

Type declaration

  • compressedSize: number

    Compressed size (or 0xffffffff for ZIP64)

  • compressionMethod: number

    Compression method; e.g. none = 0, DEFLATE = 8 (or "\0x08\0x00")

    • 00: no compression
    • 01: shrunk
    • 02: reduced with compression factor 1
    • 03: reduced with compression factor 2
    • 04: reduced with compression factor 3
    • 05: reduced with compression factor 4
    • 06: imploded
    • 07: reserved
    • 08: deflated
    • 09: enhanced deflated
    • 10: PKWare DCL imploded
    • 11: reserved
    • 12: compressed using BZIP2
    • 13: reserved
    • 14: LZMA
    • 15-17: reserved
    • 18: compressed using IBM TERSE
    • 19: IBM LZ77 z
    • 98: PPMd version I, Rev 1
  • crc32: number

    CRC-32 of uncompressed data Value computed over file data by CRC-32 algorithm with 'magic number' 0xdebb20e3 (little endian)

  • externalFileAttributes: number

    External file attributes (host-system dependent)

  • extraField: ArrayBuffer

    Extra field

    Used to store additional information. The field consistes of a sequence of header and data pairs, where the header has a 2 byte identifier and a 2 byte data size field.

  • extraFieldLength: number

    Extra field length (m)

  • fileComment: string

    File comment

  • fileCommentLength: number

    File comment length (k)

  • filename: string

    File name

  • filenameLength: number

    File name length (n)

  • generalPurposeBitFlag: number

    General purpose bit flag

    • Bit 00: encrypted file
    • Bit 01: compression option
    • Bit 02: compression option
    • Bit 03: data descriptor
    • Bit 04: enhanced deflation
    • Bit 05: compressed patched data
    • Bit 06: strong encryption
    • Bit 07-10: unused
    • Bit 11: language encoding
    • Bit 12: reserved
    • Bit 13: mask header values
    • Bit 14-15: reserved
  • internalFileAttributes: number

    Internal file attributes

    Bit 0: apparent ASCII/text file Bit 1: reserved Bit 2: control field records precede logical records Bits 3-16: unused

  • lastModifiedDate: number

    File last modification date (DOS)

  • lastModifiedTime: number

    File last modification time (DOS)

  • localFileHeaderRelativeOffset: number

    Relative offset of local file header. This is the number of bytes between the start of the first disk on which the file occurs, and the start of the local file header. This allows software reading the central directory to locate the position of the file inside the ZIP file.

  • signature: ArrayBuffer

    Central directory file header signature = 0x02014b50

  • startingDiskNumber: number

    Disk number where file starts

  • uncompressedSize: number

    Uncompressed size (or 0xffffffff for ZIP64)

  • versionMadeBy: number

    Version of the program this ZIP was made by.

    Upper byte:

    • 0 - MS-DOS and OS/2 (FAT / VFAT / FAT32 file systems)
    • 1 - Amiga
    • 2 - OpenVMS
    • 3 - UNIX
    • 4 - VM/CMS
    • 5 - Atari ST
    • 6 - OS/2 H.P.F.S.
    • 7 - Macintosh
    • 8 - Z-System
    • 9 - CP/M
    • 10 - Windows NTFS
    • 11 - MVS (OS/390 - Z/OS)
    • 12 - VSE
    • 13 - Acorn Risc
    • 14 - VFAT
    • 15 - alternate MVS
    • 16 - BeOS
    • 17 - Tandem
    • 18 - OS/400
    • 19 - OS/X (Darwin)
    • 20 - 255: Unused
  • versionToExtract: number

    Version needed to extract (minimum)

meta: {
    length: number;
}

Type declaration

  • length: number

    Length of the entire record

Generated using TypeDoc