Continuous reading or writing to a file using random offsets and lengths