A really simple suggestion:
1. Create the merge file.
2. write file name length (file1)
3. write the file name (file1)
4. write the file size (file1)
5. write the file content (file1)
do the same for file2...fileN with the steps 2..5.
You can additional use an encryption function to encrypt before write.
To read the merged files:
1. Open the file.
2. Read the length of filename (file1)
3. Allocate the file name buffer and read the filename.
4. Read the file content length.
5. Read the file content and save it to the file (file1)
Repeat the steps 2..5 til end of file.
Regards.