[Scummvm-devel] Thoughts on new save/load system

Max Horn max at quendi.de
Sun Sep 22 07:46:03 CEST 2002


One criticism made by ludde on IRC: my suggested approach doesn't 
allow for stream, the whole data has to be written/read at once.

This is half correct: you can modify it to stream writing, or 
reading, but I don't think you can stream both.

To stream writing, you simply write out data immediatly; then at the 
end of writeObject, you write the keys paired with an offset to the 
actual data (i.e. you write an index). But for reading you still have 
to wait till you read

The approach to stream reading is achieved by writing first the above 
mentioned index, then the data. This way, your first read the index.


Anyway, this is just for completness. ludde and me are now talking 
about a completly different approach on IRC :-)


Max
-- 
-----------------------------------------------
Max Horn
Software Developer

email: <mailto:max at quendi.de>
phone: (+49) 6151-494890




More information about the Scummvm-devel mailing list