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 03:11] 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 29: Line 29:
 |UInt32|Local file header signature|04034B50|Static signature value| |UInt32|Local file header signature|04034B50|Static signature value|
 |UInt16|Version needed to extract|3F00|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|0200|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|5D00|93: The file is compressed with zstd| |UInt16|Compression method|5D00|93: The file is compressed with zstd|
 |UInt16|Last mod file time|0000|zeroed time, 1/1/0001| |UInt16|Last mod file time|0000|zeroed time, 1/1/0001|
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 52: Line 52:
 |UInt16|Version made by|0000|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|3F00|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|0200|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|5D00|93: The file is compressed with zstd| |UInt16|Compression method|5D00|93: The file is compressed with zstd|
 |UInt16|Last mod file time|0000|zeroed time, 1/1/0001| |UInt16|Last mod file time|0000|zeroed time, 1/1/0001|
Line 83: Line 83:
  
  
-===== 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.1760238685.txt.gz · Last modified: 2025/10/12 03:11 by johnsanc