logically viewing separate non-contiguous files as one file
-
We are developing software that requires very large amounts of data that really should be separated as files. However, because of our clientelle, we need to keep the information as one big file. The problem with this is that many times, data found in the middle or beginning of the file needs to be added to, which means that all the data that goes after the added data must be copied to a temporary file, and then recopied to the original file after the data has been added. This is a very slow and error-prone process, but we couldn't come up with a better method. I know you can zip the file, which is essentially like a directory that stores separate files, but i believe it still stores the files contiguously in memory. Is there a way to keep multiple files completely non-continguous (I should say, having the ability to append to each file) and yet be viewed as one file? Thank you
-
We are developing software that requires very large amounts of data that really should be separated as files. However, because of our clientelle, we need to keep the information as one big file. The problem with this is that many times, data found in the middle or beginning of the file needs to be added to, which means that all the data that goes after the added data must be copied to a temporary file, and then recopied to the original file after the data has been added. This is a very slow and error-prone process, but we couldn't come up with a better method. I know you can zip the file, which is essentially like a directory that stores separate files, but i believe it still stores the files contiguously in memory. Is there a way to keep multiple files completely non-continguous (I should say, having the ability to append to each file) and yet be viewed as one file? Thank you
I would say you need to look into using XML for this project. You can insert and retrieve nodes any place within the document without the temp file/copy/write procedure.