File consists structure like header, archive files which are individually compressed, File Table.
File1.bin
[
struct FileHeader
{
crc---crc of file1.bin
headersize--size of File1.bin
Version-version File1.bin
FileCount--number of files FilesArchived
tableoffset---byte offset FielTable
Julian Date--databse begindate
}
FilesArchived--- .pdf and .bmp(individually compresed)
FileTable -- index of files in FilesArchived
Fileoffset--absolute offset of pdf file in File1.bin
compressed FileSize--- compressed size of file in FileArchive
OriginalFileSize ---uncompressed size of file in archive
flag1
flag2
From the above structure of the File1.bin
I have to extract the data from File1.bin and create the newFile1.bin and structure to be like mentioned below
newFile1.bin
structure newFileheader
{
Size of header
numofFruits
fruitbinfilename
version
begindate
}
Filename(pdf files)
Fileoffset
Orginal file size
Compressedfile size
Flag1
Flag2
Fruitfilename.
From above newFile1.bin
I have to extract the Fruitbinfilename(Fruit1.bin)
Format looks like
Fruit1.bin .... Fruit2.bin… Fruit3.bin ……..…. FruitN.bin
Pdf file1 ….. Pdf file1 ….Pdf file1 …… …….Pdf fileN
Pdf file2….. Pdf file2 …. Pdf file2 …………..Pdf fileN
Pdf file3 ….. Pdf file3 …. Pdf file3………….. Pdf fileN
.. ..
..
..
..
..
Pdf fileN ….. Pdf fileN …. Pdf fileN………….. Pdf fileN
Here we get the fruit data from Fruit.dbf files which is meta data.
In the Fruit.dbf file there will be associate mapping to pdf filename in that.</pre>
please tell me how to read and write in c++ or vc++ to generate newFile1.bin->fruit.bin from File1.bin