Noel,
The image reading code changes to handle the header differently, as does the image writing code, and we don't actually have to do the block read/write. Otherwise, I was thinking that the same behaviors would be performed.
How does that sound to you?
I don't think you need to handle the header differently - after all we can make sqImageFileWrite just a stub that writes to the appropriate memory location if the source of the data is outside of the file region :-)
On Windows CE, when you call CreateFileMapping for a size greater than the size of the file, the file is expanded to the full size of the requested space; an error is returned if there is insufficient room.
Sounds reasonable.
This is done to ensure the available of the backing store. I was planning to call SetEndOfFile to truncate the space after closing the file.
Well, why not keep the file at the full size?! It would make certain you do have appropriate space for whatever you want to do (it would be pretty cool to have a 32MB flash card that has nothing but a live Squeak image on it :-) and all it would require for image reading are some slight modifications that actually look at the header of the file for determining the data size.
Cheers, - Andreas