User Tools

Site Tools


rvzstd

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
rvzstd [2025/10/12 02:32] – [RVZstd] johnsancrvzstd [2025/10/12 03:29] (current) johnsanc
Line 5: Line 5:
  
 ===== Archive format ===== ===== Archive format =====
-==== General format of an RVZstd .zip file with n files: ====+==== General format of an RVZstd .zip archive with n files: ====
  
 ^Archive Start^ ^Archive Start^
Line 27: Line 27:
 ==== Local file header x: (Showing RVZstd default values): ==== ==== Local file header x: (Showing RVZstd default values): ====
 ^Type ^Attribute ^Value ^Description ^  ^Type ^Attribute ^Value ^Description ^ 
-|UInt32|Local file header signature|(0x04034b50)| | +|UInt32|Local file header signature|04034B50|Static signature value
-|UInt16|Version needed to extract|63|Used for modern compression algorithms like LZMA and zstd| +|UInt16|Version needed to extract|3F00|63: Used for modern compression algorithms like LZMA and zstd| 
-|UInt16|General purpose bit flag|2|Maximum compression option was used, bit 11 (0x800) is set for unicode filename| +|UInt16|General purpose bit flag| |Bit 2: (0x200) Maximum compression option was used. Bit 11(0x800) is set for unicode filename| 
-|UInt16|Compression method|93|The file is compressed with zstd| +|UInt16|Compression method|5D00|93: The file is compressed with zstd| 
-|UInt16|Last mod file time|0|zeroed time| +|UInt16|Last mod file time|0000|zeroed time, 1/1/0001
-|UInt16|Last mod file date|0|zeroed date|+|UInt16|Last mod file date|0000|zeroed date, 12:00:00 AM|
 |UInt32|CRC32| |File CRC32| |UInt32|CRC32| |File CRC32|
 |UInt32|Compressed size| |File Compressed Size| |UInt32|Compressed size| |File Compressed Size|
Line 40: Line 40:
 |Byte[]|Filename (variable size)| |Byte array of filename| |Byte[]|Filename (variable size)| |Byte array of filename|
  
-<WRAP info>The default values are required to ensure consistent RVZstd files. Unlike torrentzip, RVZstd uses zeroed values for date and time instead of the date/time of the first MAME release.</WRAP>+<WRAP info>The default values are required to ensure consistent RVZstd archives. Unlike torrentzip, RVZstd uses zeroed values for date and time instead of the date/time of the first MAME release.</WRAP>
  
 ==== File data x: ==== ==== File data x: ====
Line 49: Line 49:
  
 ^Type ^Attribute ^Value ^Description ^  ^Type ^Attribute ^Value ^Description ^ 
-|UInt32|Central file header signature|(0x02014b50)| | +|UInt32|Central file header signature|02014B50|Static signature value
-|UInt16|Version made by|0|MS_DOS and OS/2 (FAT/FAT32 file systems)| +|UInt16|Version made by|0000|MS_DOS and OS/2 (FAT/FAT32 file systems)| 
-|UInt16|Version needed to extract|63|Used for modern compression algorithms like LZMA and zstd| +|UInt16|Version needed to extract|3F00|63: Used for modern compression algorithms like LZMA and zstd| 
-|UInt16|General purpose bit flag|2|Maximum compression option was used, bit 11 (0x800) is set for unicode filename| +|UInt16|General purpose bit flag| |Bit 2: (0x200) Maximum compression option was used. Bit 11(0x800) is set for unicode filename| 
-|UInt16|Compression method|93|The file is compressed with zstd| +|UInt16|Compression method|5D00|93: The file is compressed with zstd| 
-|UInt16|Last mod file time|0|zeroed time| +|UInt16|Last mod file time|0000|zeroed time, 1/1/0001
-|UInt16|Last mod file date|0|zeroed date|+|UInt16|Last mod file date|0000|zeroed date, 12:00:00 AM|
 |UInt32|CRC32| |File CRC32| |UInt32|CRC32| |File CRC32|
 |UInt32|Compressed size| |File Compressed Size| |UInt32|Compressed size| |File Compressed Size|
Line 61: Line 61:
 |UInt16|File name length| |Filename length| |UInt16|File name length| |Filename length|
 |UInt16|Extra field length| |Normally 0, Length of Extra field data if zip64 extra field information is included| |UInt16|Extra field length| |Normally 0, Length of Extra field data if zip64 extra field information is included|
-|UInt16|File comment length|0|No file comment| +|UInt16|File comment length|0000|No file comment| 
-|UInt16|Disk number start|0|Multi disk storage not used so set to disk 0| +|UInt16|Disk number start|0000|Multi disk storage not used so set to disk 0| 
-|UInt16|Internal file attributes|0|No internal attributes| +|UInt16|Internal file attributes|0000|No internal attributes| 
-|UInt32|External file attributes|0|No external attributes|+|UInt32|External file attributes|0000|No external attributes|
 |UInt32|Relative offset of local header| |File offset of this files Local Header| |UInt32|Relative offset of local header| |File offset of this files Local Header|
 |Byte[]|File name (variable size)| |Byte array of filename| |Byte[]|File name (variable size)| |Byte array of filename|
Line 70: Line 70:
 ==== End of Central Directory: ==== ==== End of Central Directory: ====
 ^Type ^Attribute ^Value ^Description ^  ^Type ^Attribute ^Value ^Description ^ 
-|UInt32|End of central dir signature|(0x06054b50)| | +|UInt32|End of central dir signature|06054B50|Static signature value
-|UInt16|Number of this disk|0|Multi disk storage not used so set to disk 0| +|UInt16|Number of this disk|0000|Multi disk storage not used so set to disk 0| 
-|UInt16|Number of the disk with the start of the central directory|0|Multi disk storage not used so set to disk 0|+|UInt16|Number of the disk with the start of the central directory|0000|Multi disk storage not used so set to disk 0|
 |UInt16|Total number of entries in the central directory on this disk|n|Total number of files| |UInt16|Total number of entries in the central directory on this disk|n|Total number of files|
 |UInt16|Total number of entries in the central directory|n|Total number of files| |UInt16|Total number of entries in the central directory|n|Total number of files|
 |UInt32|Size of the central directory|EOCD-SOCD|length of the central directories| |UInt32|Size of the central directory|EOCD-SOCD|length of the central directories|
 |UInt32|Offset of start of central directory with respect to the starting disk number|SOCD|Start of central directory| |UInt32|Offset of start of central directory with respect to the starting disk number|SOCD|Start of central directory|
-|UInt16|.ZIP file comment length|15|RVSztd comment| +|UInt16|.ZIP file comment length|0F00|15: RVSztd comment| 
-|Byte[22]|.ZIP file comment|RVZSTD-XXXXXXXX|+|Byte[22]|.ZIP file comment|52565A5354442D...|RVZSTD-XXXXXXXX|
  
 <WRAP info>See above 'General format of an RVZstd .zip file with n files' for SOCD & EOCD</WRAP> <WRAP info>See above 'General format of an RVZstd .zip file with n files' for SOCD & EOCD</WRAP>
  
  
-===== The TorrentZipped files comment =====+===== The RVZstd archive comment =====
 The ZIP file comment in the End of Central Directory is used to check the validity of the RVZstd file. The ZIP file comment in the End of Central Directory is used to check the validity of the RVZstd file.
  
Line 90: Line 90:
 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 an RVZstd file. 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 an RVZstd file.
 ===== Filename Encoding ===== ===== Filename Encoding =====
-The filenames of the compressed files in a zip file are stored in the local header and the central directory as byte arrays. Zip was original build on early IBM PCs, and as such uses [[https://en.wikipedia.org/wiki/Code_page_437|code page 437]] to convert a string to a byte array to store the filenames. With the arrival of Unicode multiple different methods where added to the official zip format to permit Unicode filenames to be stored in a zip file. RVZstd format uses the general purpose bit 11 method. So to store a filename in an RVZstd zip file you must first see if the filename can be stored using code page 437, if not then UTF-8 encoding should be used in the byte arrays, this is then indicated by setting bit 11 of the General Purpose Bit Flags both in the local header and central directory.  +The filenames of the compressed files in a zip archive are stored in the local header and the central directory as byte arrays. Zip was original built on early IBM PCs, and as such uses [[https://en.wikipedia.org/wiki/Code_page_437|code page 437]] to convert a string to a byte array to store the filenames. With the arrival of Unicodemultiple different methods were added to the official zip format to permit Unicode filenames to be stored in a zip file. RVZstd format uses the general purpose bit 11 method. So to store a filename in an RVZstd zip file you must first see if the filename can be stored using code page 437, if not then UTF-8 encoding should be used in the byte arrays, this is then indicated by setting bit 11 of the General Purpose Bit Flags both in the local header and central directory.  
  
  
rvzstd.1760236345.txt.gz · Last modified: 2025/10/12 02:32 by johnsanc