Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3634500
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T00:47:12+00:00 2026-05-19T00:47:12+00:00

I am looking for a way to make speedy modifications to large multi-gigabyte files.

  • 0

I am looking for a way to make speedy modifications to large multi-gigabyte files. Do the Win32 API support the ability to insert text into a file at a specific offset without having to rewrite the entire file back to disk from the very beginning or from the offset of the change?

Consider an example. Let’s say we have the text “test” repeated over and over in a file that is 1 GB in size. If I want to go to the 500 MB offset and insert the text “new”, is there a way to insert it without having to rewrite the entire file from the beginning, and/or without having to rewrite the last 500 MBs of it?

Can it be done using Win32 API? If not, are there any strategies to optimize a text insertion operation like this to maximize speed?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T00:47:13+00:00Added an answer on May 19, 2026 at 12:47 am

    There are methods to rewrite only the portion after the insertion point, but generally, no – to insert something at a particular point in a file, you must re-write everything after that point.

    This boils down to the way files are stored on disk – typically in chunks, such that this operation is either not possible or not easy. For 99% of the cases, this doesn’t matter, so the API doesn’t expose a way of doing this.

    If you have control over the file format, you can engineer ways such that you can write data to the end of the file, but have some tracking data to say “this stuff really belongs here”.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am looking for the best way to make my desktop java program run
I'm looking for a lightweight way to make my program (written in C) be
I am looking for a way to condense relatively small areas of text on
I am looking for a way to make a program in C or C++
I'm looking for a way to make an NSInvocation invoke a specific IMP .
I am looking for a way to make IIS Express contained within a project
I was looking for a way to make required parameters in powershell when I
I am looking for a way to make my Android app do something every
looking a way to make a toggle on doubleclick, this is my code: $('#mydiv').toggle(function()
I'm looking for a way to make the best possible combination of people in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.