Although I replied this as a PM, I'm copying it also here as it might interest someone else too...:
QUOTE said:
I know what happened. I did the wrong test. What I actually did is :
(original) ISO -> .wbfs -> ISO
(original) ISO -> WBFS drive -> ISO
The two ISO created are not identical.
Aha yes if you did that it is expected, reason is different block size, let me give an example...
Let's say the original disc looks like this:
D###,####,#DDD,D###,####,....
Where each letter is 1MB and D is data while # is garbage.
commas are delimiting 4MB blocks just for easier understanding
Putting such ISO to a WBFS partition with a 4MB block size and converting back to .iso will result in this:
D###,____,#DDD,D###,____,....
Where _ means zeroed out blocks. So you see that garbage that is inside 4mb blocks is retained.
converting the original ISO to .wbfs will use a 2MB scrubbing block size and the converted iso to .wbfs and back to iso will look like this:
D#__,____,#DDD,D#__,____,....
Here more garbage is scrubbed and replaced with zeroes, that is why there is a difference.
The same result will be obtained if the original iso is scrubbed with wbfs_file and -u 2 option.
If intead -u 1 option is used then the scrubbing block is just 1 wii sector so completely all garbage will be removed and the scrubbed iso will look like this:
D___,____,_DDD,D___,____,....
If such an iso is passed to .wbfs or WBFS and back to iso it will always result in the same iso.
So maybe an option could be added to always completely zero the garbage data when copying to .wbfs / WBFS. It might make sense, but i think in past the reason for not removing all garbage data was the inability of libwbfs to detect all the used data blocks, until wiimm (afaik) fixed that problem in libwbfs.
Maybe I could make wbfs_file option -u take effect when writing to .wbfs files or WBFS partitions as well, not sure if there is much interest in that... at the moment it is possible to do if the iso is fully scrubbed first and then copied to wbfs.
Another thing to note is that libwbfs will fill the garbage with zeroed out blocks wile WiiScrubber will fill them with the value 0xFF.