diff --git a/docs/unrar.html b/docs/unrar.html index 72667ca..8800bd3 100755 --- a/docs/unrar.html +++ b/docs/unrar.html @@ -153,7 +153,7 @@ PackSize 4 bytes UnpSize 4 bytes HostOS 1 byte FileCRC 4 bytes -FileTime 4 bytes +FileTime (mtime) 4 bytes (MS-DOS date/time format) UnpVer 1 byte Method 1 byte NameSize 2 bytes @@ -171,39 +171,63 @@ Packed Data (Total Packed Size) bytes
ExtTime Structure
+ +

This structure has 4 sections representing additional time data.

+

The first 16 bits contain a set of flags, 4 bits for each section.

+

Each flag contains:

+ + +

Each section contains:

+ + +

Follow the following pseudo-code to read in the ExtTime Structure.

-

TODO: Fill in details of what this structure represents.

+const one_second = 10000000; // 1 second in 100ns intervals => 1E7
 var extTimeFlags = readBits(16)
 
 mtime:
 mtime_rmode = extTimeFlags >> 12
 if ((mtime_rmode & 8)==0) goto ctime
 mtime_count = mtime_rmode & 0x3
-mtime_reminder = readBits(8*mtime_count);
+mtime_remainder = readBits(8*mtime_count);
+if ((mtime_rmode & 4)!=0) mtime_remainder += one_second
 
 ctime:
 ctime_rmode = extTimeFlags >> 8
 if ((ctime_rmode & 8)==0) goto atime
-Set ctime to readBits(16)
+Set ctime to readBits(32)
 ctime_count = ctime_rmode & 0x3
-ctime_reminder = readBits(8*ctime_count)
+ctime_remainder = readBits(8*ctime_count)
+if ((ctime_rmode & 4)!=0) ctime_remainder += one_second
 
 atime:
 atime_rmode = extTimeFlags >> 4
 if ((atime_rmode & 8)==0) goto arctime
-Set atime to readBits(16)
+Set atime to readBits(32)
 atime_count = atime_rmode & 0x3
-atime_reminder = readBits(8*atime_count)
+atime_remainder = readBits(8*atime_count)
+if ((atime_rmode & 4)!=0) atime_remainder += one_second
 
 arctime:
 arctime_rmode = extTimeFlags
 if ((arctime_rmode & 8)==0) goto done_exttime
-Set arctime to readBits(16)
+Set arctime to readBits(32)
 arctime_count = arctime_rmode & 0x3
-arctime_reminder = readBits(8*arctime_count)
+arctime_remainder = readBits(8*arctime_count)
+if ((arctime_rmode & 4)!=0) arctime_remainder += one_second
 
 done_exttime
 
@@ -555,4 +579,4 @@ ZeroCount 4 bits (only present if BitLength is 15) - \ No newline at end of file +