• Login
  • Register
  • Dolphin Forums
  • Home
  • FAQ
  • Download
  • Wiki
  • Code


Dolphin, the GameCube and Wii emulator - Forums › Dolphin Emulator Discussion and Support › General Discussion v
« Previous 1 ... 98 99 100 101 102 ... 365 Next »

Decompressing GCZ to ISO fills with 0xFF
View New Posts | View Today's Posts

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Modes
Decompressing GCZ to ISO fills with 0xFF
02-20-2016, 08:25 AM
#1
osupka
Unregistered
 
I use Wit to scrub a Wii iso. This tool fills the unused bytes with 0x00. When I compress this ISO with Dolphin to GCZ, then decompress it back to ISO, Dolphin uses 0xFF to fill the unused bytes. So in the result the 0x00 are replaced with 0xFF. Why does Dolphin have such behaviour? What's the point?
Reply
02-20-2016, 08:53 AM
#2
mimimi Offline
Senior Member
****
Posts: 716
Threads: 1
Joined: May 2014
What's the difference? The hash won't match the one from the original anymore either way. The unused bytes are like you write, unused, so it totally does not matter what's in there.
Find
Reply
02-21-2016, 05:30 AM
#3
osupka
Unregistered
 
(02-20-2016, 08:53 AM)mimimi Wrote: What's the difference? The hash won't match the one from the original anymore either way. The unused bytes are like you write, unused, so it totally does not matter what's in there.

It breaks the "sparse file" effect. Otherwise some filesystems like NTFS (and some linux's) would be able to optimize the storage for bulk 0x00 blocks.
Reply
02-21-2016, 05:54 AM (This post was last modified: 02-21-2016, 05:54 AM by JosJuice.)
#4
JosJuice Offline
Developer
**********
Developers (Some Administrators and Super Moderators)
Posts: 8,684
Threads: 7
Joined: Oct 2014
Doesn't the program need to tell the OS which areas are sparse in order for that to work? Non-sparse 0x00 doesn't have any advantage over non-sparse 0xFF.
Find
Reply
02-21-2016, 06:52 AM
#5
osupka
Unregistered
 
(02-21-2016, 05:54 AM)JosJuice Wrote: Doesn't the program need to tell the OS which areas are sparse in order for that to work? Non-sparse 0x00 doesn't have any advantage over non-sparse 0xFF.

There are third party tools (and a user can write his own, 10 lines of code actually) that search the specified files for large empty blocks, and turns them into sparse files.
Reply
02-21-2016, 06:58 AM
#6
mbc07 Offline
Wiki Caretaker
*******
Content Creators (Moderators)
Posts: 3,525
Threads: 46
Joined: Dec 2010
You can use wit to decompress the ISO from GCZ too if you're concerned with 0x00's instead of 0xFF's...
Avell A70 MOB: Core i7-11800H, GeForce RTX 3060, 16 GB DDR4-3200, Windows 11 (Insider Preview)
ASRock Z97M OC Formula: Pentium G3258, GeForce GT 440, 16 GB DDR3-1600, Windows 10 (21H2)
Find
Reply
02-21-2016, 07:14 AM
#7
JosJuice Offline
Developer
**********
Developers (Some Administrators and Super Moderators)
Posts: 8,684
Threads: 7
Joined: Oct 2014
(02-21-2016, 06:52 AM)osupka Wrote: There are third party tools (and a user can write his own, 10 lines of code actually) that search the specified files for large empty blocks, and turns them into sparse files.

Fair point. There's no particular reason to use 0xFF as far as I know, so making Dolphin use 0x00 instead doesn't sound like a controversial change. I can't do it right now, but if anyone else wants to, changing this line should be enough: https://github.com/dolphin-emu/dolphin/blob/25a584626f328412c21a11f175849539c983e6be/Source/Core/DiscIO/DiscScrubber.cpp#L137
Find
Reply
02-21-2016, 07:27 AM
#8
osupka
Unregistered
 
(02-21-2016, 06:58 AM)Jhonn Wrote: You can use wit to decompress the ISO from GCZ too if you're concerned with 0x00's instead of 0xFF's...

Actually, that didn't work when I tried. I don't know why, but I get an error when trying to decompress Dolphin GCZ's with Wit. Although no problem when decompressing Wit GCZ's with Dolphin.

But yes, I use wit to make ISOs sparse again. Just use wit on the decompressed ISO.
Reply
« Next Oldest | Next Newest »


  • View a Printable Version
  • Subscribe to this thread
Forum Jump:


Users browsing this thread: 1 Guest(s)



Powered By MyBB | Theme by Fragma

Linear Mode
Threaded Mode