Originally Posted by Valloric
SGF just takes whatever the state of your XHTML code is in currently and dumps it as one large XHTML file (in an epub-like container, with the included images etc). The source file looks exactly like what you see in Code View.
Exporting an epub takes your source code, splits it up on chapter breaks, filters out Sigil-specific CSS and XHTML, creates CSS files from <style> tags and then writes it all out. It's a bit more involved than that. So there is some (a lot actually) pre-processing going on.
With SGF, there is no preprocessing. It's your "working" code dumped raw. The benefit here is that you are isolated from the changes that are made when exporting an epub. With time, I'll add dialogs that pop up on import and export (like what Photoshop does for instance) that let you fine-tune how your file is imported or exported. You could perhaps add margins on export, or on import filter out the cruft from HTML exported from Word etc. None of this will happen for SGF, because that format is already "the way it should be". Think of it as Photoshop's PSD.
In the future, when Sigil supports loading and saving of different file formats (RTF, Mobi, LIT, LRF etc... who knows), those formats will conceivably need some specific information recorded that you can't just store in an epub. So when working on it, you would store it as an SGF, and it would have all the possible information you could record in Sigil.
Again, the idea is to have something like Photoshop's PSD. A "neutral", application-specific format that could be extended, changed, updated etc.
I was just thinking if it might be possible to edit the sgf file directly with an editor to make up for that missing Search & Replace feature. What compression method did you use. I would like to uncompress it, edit the SGF file with my editor and save it back to sgf so that I could reopen it in Sigil.
Edit: Okay, I found it out myself: The SGF file is a zip file, so editing it is simple. That solves a lot of my problems until S&R is done.