That did it! Copying the 50GB file cleared that attribute as theorized. That of course meant a new create date, so I ran the PowerShell command for that again and double checked that the sparse attribute had not returned and it hadn't, so both dates were in the past and the sparse file attribute was non-present.
And then your command above generated volumes with the correct checksums. :)
The reason that sparse file is set on the file I think comes from how I got the file, which is from qBittorrent, which in turn is based on libtorrent. Apparently sparse file is by default on to (I guess) save on actual writes to the drive, since large strings of zeroes are actually not written? However "Size" and "Size on disk" are both still the full number of bytes (51 229 491 200) for both the sparse, downloaded file and the non-sparse, copied file, so maybe there was actually nothing to be "sparse with" on this particular file, so it had to write the whole thing. Only the attribute is set, without any actual effect on the file itself.
And maybe there seldom is? An .iso like this probably uses some form of internal compression, so long strings of zeroes are probably among the first things to go. All bits and bytes matter here, so to speak. So maybe this sparse file attribute rarely gets to do something. I don't know…
There doesn't seem to be an easy way to disable this behavior in qBittorrent. And the concept (inherent to NTFS) is maybe not bad to just have anyways. Why write something you don't have to, until you actually need to? Just unnecessary wear on the drive. Although practically you're not going to wear out your SSD before it becomes obsolete anyway, even if you do download some large .iso:s now and then.
You CAN enable preallocation though where it starts by writing zeroes to the whole area where the file is going to be. This disables sparse files also. This could be somewhat useful for hard drives to minimize fragmentation, but is completely irrelevant for SSDs, which purposely fragment files for both parallelized performance gains and wear leveling reasons anyway. So if you preallocate it's not going write the data to the SSD any differently than how it would have otherwise. You're just stuck waiting for it to write the empty file first. In fact, it's gonna mean more wear, since it first writes zeroes and then replaces some of them with ones.
On the otherhand, if I need to clear the sparse file attribute afterwards, then I'm going to have to write the whole file again anyway… But probably not worth enabling, just because of the occasional release that doesn't work outright in pyReScene.
But this whole thing got me thinking!
I also got this release through qBittorrent and the .iso also had 0x220, but could automatically be recreated with pyReScene.
https://www.srrdb.com/release/details/A.Plague.Tale.Innocence-CODEX
I checked the details of the .srr and, sure enough, ATTR is supposed to be 0x20. So how come ATTR didn't matter for this release?
Block: RAR File; offset: 0x3086 (12422 bytes)
|Header bytes: 79e374028149000fb2e60e0080899e022afcd52b2195ae4e1d312100200000000000000009000000636f6465782d612e706c616775652e74616c652e696e6e6f63656e63652e69736f
|HEAD_CRC: 0xE379
|HEAD_TYPE: 0x74 (RAR File)
|HEAD_FLAGS: 0x8102
| 0x8000 LONG_BLOCK (ADD_SIZE field present)
| 0x0002 LHD_SPLIT_AFTER (file continued in next volume)
| 0x0100 LHD_LARGE (only used for files larger then 2GiB)
| 0x0000 LHD_WINDOW (Dictionary size 64 KiB)
|HEAD_SIZE: 0x49 (73 bytes)
+PACK_SIZE: 249999887 bytes (ADD_SIZE + HIGH_PACK_SIZE field)
+UNP_SIZE: 41314516992 bytes
+HOST_OS: Windows used to create this file block.
+FILE_CRC: 2BD5FC2A
+FTIME: 2019-05-14 18:41:02
+UNP_VER: Version 2.9 is needed to extract.
+METHOD: Fastest compression
+NAME_SIZE: always present
+ATTR: 20
+HIGH_PACK_SIZE: 0
+HIGH_UNP_SIZE: 9
+FILE_NAME: codex-a.plague.tale.innocence.iso
And furthermore, I didn't have to mess around with any dates on the .iso file either. This release does not have LHD_EXTTIME in the header and therefore not that block at the bottom.
+modification time: 2005-05-13 18:57:29
+creation time: UNKNOWN
+last access time: UNKNOWN
+archival time: UNKNOWN
So then I did some testing:
1.
I copied the first release again, so I got a new create date, but the old modified date and no sparse file attribute and ran the command again and the volumes still had the correct checksums!
2.
So I changed the modified date to something modern as well and reran, but then I got the wrong checksums…
Putting this together, it seems that FTIME does not matter, since
… and "UNKNOWN" might be null or something in the actual .srr file. Might just be presented as "UNKNOWN" when you use —details.
But modification time is there, so that needs to match. The CODEX release .srr had none of that stuff, so I guess they did not use to store the .iso file modification time in their .rar files, whereas Razor 1911 do? And that's why those lines appear in the .srr file maybe? Maybe if even only one of them is there in the archive, then all four lines are included in the .srr or something?
It seems the default behavior in WinRAR is "-tsm4 -tsc0 -tsa0", which means full NTFS precision on the modification time and the other ones are omitted. I.e. if you don't specify anything this is what you get. Maybe CODEX went out of their way to not include anything.
Aaanyway, back to why having the wrong attributes on the file still worked for the second release here. My theory is that when you use pyReScene to automatically try to recreate the files, then this
Grabbing large enough data piece size for testing.
when it creates its sample, it inadvertently also loses the sparse file attribute on its sample copy. So the resulting checksums check out and it starts the process. I then also think that WinRAR - at least when compressing data - does not (or can't) consider sparse files, so the sparsity is then again lost in the actual compression process. I even tried to extract the second release from the files I had generated before and the resulting .iso was not sparse, even though the .iso I had used to create the rars was.
I checked some other recent Razer 1911 .srr files and it seems for at least AAA titles that this is usually there.
+modification time: 2005-05-13 18:57:29
So in summary if the automatic recreation doesn't work for future Razer 1911 then:
0. Check the details of the .srr file. Perhaps not needed, since the next steps will probably work.
srr.exe --details name.srr > name.txt
1. Copy the file to get rid of the sparse file attribute.
2. Set this modification date in PowerShell.
(Get-Item "name.iso").LastWriteTime=("13 May 2005 18:57:29")
3. Manually create the rar files, of course paying attention to the volume size.
2015-11-18_rar530.exe a -m1 -mdG -v250000000b -s- -ds -mt12 -vn -o+ -ep -idcd -ma4 name.rar name.iso