Re: Reading Binary Files
Rohith <Rohith@discuss ions.microsoft. com> wrote:[color=blue]
> As its a Huge file nearly(2GB), it would not be easy to form magic bytes
> that will be present only once.[/color]
They'd only have to not be present at the start of the old files.
Compare that with your delimiter idea which relies on the delimiter
*never* being present.
[color=blue]
> Also the text present in the binary file will
> not be the same..So to find the magic bytes do i have to search throught he
> file every time before serializing?[/color]
No, you'd look for the magic bytes at the start of the file when
*deserializing* .
--
Jon Skeet - <skeet@pobox.co m>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Rohith <Rohith@discuss ions.microsoft. com> wrote:[color=blue]
> As its a Huge file nearly(2GB), it would not be easy to form magic bytes
> that will be present only once.[/color]
They'd only have to not be present at the start of the old files.
Compare that with your delimiter idea which relies on the delimiter
*never* being present.
[color=blue]
> Also the text present in the binary file will
> not be the same..So to find the magic bytes do i have to search throught he
> file every time before serializing?[/color]
No, you'd look for the magic bytes at the start of the file when
*deserializing* .
--
Jon Skeet - <skeet@pobox.co m>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Comment