Function computeEOCD

  • Locates the end of central directory record at the end of the file. Throws an exception if it cannot be found.

    Parameters

    • data: Uint8Array

    Returns Header

    Unfortunately, the comment is variable size and up to 64K in size. We assume that the magic signature does not appear in the comment, and in the bytes between the comment and the signature. Other ZIP implementations make this same assumption, since the alternative is to read thread every entry in the file.

    Offsets in this function are negative (i.e. from the end of the file).

    There is no byte alignment on the comment