Jump to content

Finding the end of file in case of binary files

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
1 reply to this topic

#1
saviour2009

saviour2009

    Newbie

  • Members
  • Pip
  • 5 posts
Hello everybody.......I am working on some ".raw" audio files and I am confused how to find the end of file. I am trying to split a larger binary file into a set of smaller binary files and using "EOF" character to find the end of larger file so that the smaller file may not get appended with some junk characters. But as expected the files should be of same length but I am getting some files which are of different length. Help needed in this regard.

#2
outsid3r

outsid3r

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 623 posts
a specific file format like that may have a structure at the beginning of the file that tells some details about the file itself, for example, a signature that identifies the file type, the raw size of the audio track, the offset where the audio begins, compression ratio, etc. You need to check somewhere the correct information about the file and then you can manipulate it correctly.