Advanced file system manipulation
I would like to build a program to pack/unpack files without compression in a fast way using advanced file system manipulations. Here's how i want to do it:
Imagine we have some large files A, B, C (1GB each, for example). I want to pack them in a file called ABC.pack doing the following:
1- I will create a header file (ABC.header) for the packed file, containing information about packed files (A, B, C): size, name, etc.
2- Manipulating the file system, I will "merge" header and files (ABC.header, A, B, C) into one file (ABC.pack), but WITHOUT MOVING DATA, just modifying the file system "pointers" or wharever they are called.
So, from this situation (header is already generated):
After the process of packing/merging we will have this situation:
ABC.header A B C
| | | |
v v v v
[ header data ][ A data ][ B data ][ C data ]
We can go back to the initial situation because the ABC.pack file has information (in the header) about the files that were merged.
[ header data A data B data C data ]
Of course, data can be fragmented, initially or after merging. At least, after merging, data will be surely fragmented in the limits of each file data (header, A, B, C).
Do you know how can I program this merging?
Or there is already a program that can do this?
If I haven't explain it well please just ask me. I know it's somewhat confusing.