How can I insert or remove bytes from the middle of a large file in .NET

前端 未结 4 1904
自闭症患者
自闭症患者 2021-01-12 08:12

Is it possible to efficiently insert or remove bytes from the middle of a large file, and if so how? Or am I stuck rewriting the entire file after the point

4条回答
  •  日久生厌
    2021-01-12 08:44

    If it is a flat file, you have to rewrite the portion after the edits. If it is a file with logical structure (e.g., pointers to other parts of the file), then updates can be very efficient.

提交回复
热议问题