I have a file that exists within a text and a binary image, I need to read from 0 to 30 position the text in question, and the position on 31 would be the image in binary format. What are the steps that I have to follow to proceed with that problem?
Currently, I am trying to read it using FileStream
, and then I move the FileStream var to one BinaryReader
as shown below:
FileStream fs = new FileStream(filePath, FileMode.Open, FileAccess.Read)
BinaryReader br = new BinaryReader(fs)
From there forward, I'm lost.
UPDATE
Alright, so I Can read my file now. Until the position 30 is my 30 string, from position 30 is the bit string Which is Actually an image. I wonder how do I read the bytes from position 30 and then save the images! Does anyone have any ideas? Follow an example from my file to you have some ideia:
£ˆ‰¢@‰¢@¢–”…@•…¦@„£@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@.-///%<<??@[K}@k{M÷]kðñôôô}ù~øòLKóôòÿg
Note that even the @ @ @ is my string and from that the picture would be one byte.