|
-
March 17th, 2005, 07:13 PM
#1
removing heders of the file
Is there any way to remove the headers of one file .
I need to remove the headers .
for example :
00001 0xdfsd 0xrwe 0xdfg 0xds
00002 0xdfdf 0xddf 0xdfd 0xfdf
00003 0xdas 0xfsdf 0xdfd 0xfdf
...
...
00001 ,00002 etc are the headers of the file.
When i read using fread () how to remove the headers only?
-
March 17th, 2005, 07:22 PM
#2
Re: removing heders of the file
 Originally Posted by rtos
When i read using fread () how to remove the headers only?
What do you mean by 'remove'? Do you just want to read the file, but ignore the header? Or do you need to write the file back without the header?
-
March 17th, 2005, 07:25 PM
#3
Re: removing heders of the file
 Originally Posted by rtos
00001 0xdfsd 0xrwe 0xdfg 0xds
00002 0xdfdf 0xddf 0xdfd 0xfdf
00003 0xdas 0xfsdf 0xdfd 0xfdf
Strange... Are that the literal contents of the file? Or are those supposed to be hex numbers (as the 0x prefix suggests)? If yes, what are characters like 'r', 'w' and 's' doing there?
-
March 17th, 2005, 07:26 PM
#4
Re: removing headers of the file
I want to write the file to another file without header .
The file is quite big .
So ,how to write the data only to another file without header?
-
March 17th, 2005, 07:39 PM
#5
Re: removing headers of the file
 Originally Posted by rtos
I want to write the file to another file without header .
The file is quite big .
So ,how to write the data only to another file without header?
The only straightforward way is to read your file into memory (either entirely or in chunks) and write it back to the new file, starting after the header data. How the end of the header can be found depends on how it is organized - it might have a fixed size (easy) or be structured, so you would need a way to interpret it and find out where it ends.
-
March 17th, 2005, 07:56 PM
#6
Re: removing heders of the file
thanks i got the idea now.
i will try it now.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|