Results 1 to 2 of 2

Thread: can zip directory entries share file entries?

  1. #1
    Member
    Join Date
    Feb 2010
    Location
    Nordic
    Posts
    200
    Thanks
    41
    Thanked 36 Times in 12 Posts

    Question can zip directory entries share file entries?

    Name:  ZIPformat.jpg
Views: 1804
Size:  68.9 KB

    http://en.wikipedia.org/wiki/ZIP_%28...t%29#Structure

    Can the file entries and the directory entries be in any order? Must file entry 1 correspond to directory entry 1?

    can the directory entries in a zip file point to the same file data as another directory entry? E.g. if a zip file contained an exactly-duplicate file, could the two entries point to the same compressed data or would the data need to be duplicated?

    Would this cause problems for normal zip tools extracting files successfully, or updating an archive?
    Last edited by willvarfar; 23rd February 2011 at 15:11.

  2. #2
    Administrator Shelwien's Avatar
    Join Date
    May 2008
    Location
    Kharkov, Ukraine
    Posts
    3,423
    Thanks
    223
    Thanked 1,052 Times in 565 Posts
    "Header Offset" in ZIPDIRENTRY points to a header, not to file data.
    So you'd get things like:
    Code:
    Z:\@3>unzip -t PKFIXED.ZIP
    Archive:  PKFIXED.ZIP
        testing: 1/                       OK
        testing: 1/print.css              OK
    print.css:  mismatching "local" filename (1/print.css),
             continuing with "central" filename version
        testing: print.css                OK
    At least one warning-error was detected in PKFIXED.ZIP.
    
    Z:\@3>7z t PKFIXED.ZIP
    
    7-Zip 9.20  Copyright (c) 1999-2010 Igor Pavlov  2010-11-18
    
    Processing archive: PKFIXED.ZIP
    
    Testing     1
    Testing     1\print.css
    Testing     print.css     Unsupported Method
    
    Sub items Errors: 1

Similar Threads

  1. Directory scanning in windows
    By Shelwien in forum The Off-Topic Lounge
    Replies: 2
    Last Post: 26th November 2009, 14:49
  2. Can't extract file from ARC file.
    By Absurd in forum Data Compression
    Replies: 3
    Last Post: 26th January 2009, 21:11
  3. Mounting a .zip file
    By jaclaz in forum Data Compression
    Replies: 7
    Last Post: 24th November 2008, 04:54
  4. RZM doesn't like to share cpu
    By SvenBent in forum Data Compression
    Replies: 2
    Last Post: 19th July 2008, 23:35
  5. QuickLZ ZIP - new zip/deflate library
    By Lasse Reinhold in forum Forum Archive
    Replies: 23
    Last Post: 1st October 2007, 23:08

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •