In short, if you only need serialization, which means that you will read and write from and to stream than you can use here without any problems and release a member of your group by elements or use any serialization library from CArchive to
.. .. everything you see.
If not, and you will need to directly access your data inside the file, then ... you will use your requirements, and they will tell you with some skill what format the file that you use having will be.
And yes, to a broad topic, to live here. For instance,
I need a thumbnail database for my software. Each sketch has a timestamp, and I know that they will have a different size. Requirements:
- sequential write (thumbs will be added to the end of the database)
- thumbs will be added in ascending order.
- direct reading (set time, getting sketch in o (1))
- without further database modification
- thumbnails will be on for 15 seconds
Yes, the requirements are simple, but they stand for themselves.
I created two files, one with indexes and the other with images.
Storage: add the data file with the image, add the index file with the image index to the data file. Reading: find the index in the file using simple indexing (index (timestamp-timestamp_start)/15
). Use this index to retrieve image data.
source share