Im trying to read a binary file where the data I'm interested in is separated across the file. Which read pattern is better? (suppose initial stream position is at byte 0)
- read(count=8192), seek(offset=20480, origin=Current), read(count=8192), seek(offset=12288, origin=Current)
- read(count=8192), seek(offset=28672, origin=Begin), read(count=8192), seek(offset=49152, origin=Begin)
Since .NET Streams enable me to choose the SeekOrigin, which seek pattern is better,
the one starting from SeekOrigin.Begin
, or the one that continues seeking from
the SeekOrigin.Current
position?
Does it matter? Can't the OS just do the calculation itself and decide for me?