trrntzipui
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
trrntzipui [2020/11/18 12:22] – gordonj | trrntzipui [2020/11/18 12:32] – gordonj | ||
---|---|---|---|
Line 16: | Line 16: | ||
|2012-01-03|Also fixed the directory separator character to be '/' | |2012-01-03|Also fixed the directory separator character to be '/' | ||
|2012-02-02|Zip64 support added by ' | |2012-02-02|Zip64 support added by ' | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | **__The TorrentZipped Files Comments__** | ||
+ | |||
+ | The .ZIP file comments in the End of Central directory is used to check the validity of the torrentzipped | ||
+ | file. | ||
+ | |||
+ | The comment must be formatted as the 22 bytes of TORRENTZIPPED-XXXXXXXX | ||
+ | The XXXXXXXX is the CRC32 of the central directory records stored as hexadecimal upper case text. | ||
+ | (the CRC32 of the bytes in the file between Start Of Central Directory & End Of Central Directory) | ||
+ | |||
+ | This comment ensures that if any change is made to the files within the zip this checksum will no longer | ||
+ | match the byte data in the central directory, and in this way we can check the validity of a torrentzip file. | ||
+ | |||
+ | **__File Order with a TorrentZip__** | ||
+ | |||
+ | For the creation of consistent torrentzipped files, the file order is also very import. | ||
+ | Files must be sorted by filename using a lower case sort. (Unicode values.) | ||
+ | |||
+ | **__Directory separator character__** | ||
+ | |||
+ | As zips only store files (not directories), | ||
+ | the filename. For example file ‘test1.rom’ in directory ‘set1’ would be stored with a filename of | ||
+ | ‘set1/ | ||
+ | This leads to a possible naming inconsistency. The zip file format state “All slashes should be forward | ||
+ | slashes ‘/’ as opposed to backwards slashes ‘\’ “. So Torrentzip will change all ‘\’ character to ‘/’. | ||
+ | (This must be done before sorting, to ensure that the sort is performed correctly.) | ||
+ | |||
+ | **__Directory Entries and Empty Directories__** | ||
+ | |||
+ | A directory entry is stored in a zip by adding a file entry ending in a directory separator character with a | ||
+ | zero size and CRC. So directory ‘set1’ would be stored as a zero length, zero CRC file called ‘set1/ | ||
+ | Some zip programs when adding the previously mentioned file ‘set1/ | ||
+ | directory ‘set1/ | ||
+ | unnecessary, | ||
+ | this inconsistency un-needed directories should be removed from the zip, the only needed directory | ||
+ | entries are empty directories that are not implied by any file entries. | ||
+ | |||
+ | Example: | ||
+ | ^Filename^Size^CRC^ | ||
+ | |set1/ | ||
+ | |set1/ | ||
+ | |set2/ | ||
+ | |||
+ | The set1/ entry should be removed, as it is implied by the set1/ | ||
+ | kept to create the empty directory, as removing it would completely remove the set2 directory. | ||
Latest ZIP files format specifications can be found here [[https:// | Latest ZIP files format specifications can be found here [[https:// |
trrntzipui.txt · Last modified: 2024/04/10 19:08 by johnsanc