User Tools

Site Tools


trrntzipui

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
trrntzipui [2020/11/26 18:23] johnsanctrrntzipui [2024/04/10 19:08] (current) johnsanc
Line 19: Line 19:
 |2007-05-09|First code commit. (by shindakun)| |2007-05-09|First code commit. (by shindakun)|
  
- 
- 
- 
- 
-**__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 important. 
-Files must be sorted by filename using a lower case sort. (Unicode values.) 
- 
-**__Directory separator character__** 
- 
-As zips only store files (not directories), files in directories are represented by storing a relative path to 
-the filename. For example file ‘test1.rom’ in directory ‘set1’ would be stored with a filename of 
-‘set1/test1.rom’. Some zipping programs will store this as ‘set1\test1.rom’. 
-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/test1.rom’ will also add the 
-directory ‘set1/’, this creates an inconsistency problem. In this example the ‘set1/’ directory entry is 
-unnecessary, as the filename ‘set1/test1.rom’ implies the existents of the ‘set1/’ directory. To resolve 
-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/|0|00000000| 
-|set1/test1.rom|1024|53AC4D0| 
-|set2/|0|00000000| 
- 
-The set1/ entry should be removed, as it is implied by the set1/test1.rom file. The set2/ entry should be 
-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://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT|https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT]] 
trrntzipui.1606443783.txt.gz · Last modified: 2020/11/26 17:23 (external edit)