[Solved] Speed up reading a file to multiple bytes array and copy the offsets by if statement
You might have fallen in the “I use bytes and arrays so I’m low level so the code will be fast” trap. C# and .NET provide its users with efficient abstractions to avoid this, in this case probably a BinaryReader and its ReadString method. You code has problems: You don’t read the entire file (you … Read more