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 741501
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T08:38:22+00:00 2026-05-14T08:38:22+00:00

Is it possible to efficiently insert or remove bytes from the middle of a

  • 0

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 where the data was inserted or removed?

[A lot of Bytes][Unwanted Bytes][A lot of Bytes] - > [A lot of Bytes][A lot of Bytes]

or

[A lot of Bytes][A lot of Bytes] - > [A lot of Bytes][New Inserted Bytes][A lot of Bytes]
  • 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-14T08:38:22+00:00Added an answer on May 14, 2026 at 8:38 am

    The most efficient way would be to seek to the position where you want to insert the element, read everything up to the end, insert the new element and copy back the rest.

    The problem’s not a language one, but actually how data is stored in media, where everything’s just a long sequence of bits. You can imagine it as a single strip of paper with the data written out in pen. If you want to insert something, you’ll have to push back everything that comes afterwards.
    Of course, if you’ve got a lots of empty space between blocks of data, you can insert your stuff in there (which is the idea behind Sparse Files), but that’s hardly space-efficient.

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

Sidebar

Related Questions

Currently looking to extract data from 2 tables and insert into another. Tables as
Im trying to shift my array left as efficiently as possible. Im using pointers
im trying to orient my code to use the cache as efficiently as possible
I'm trying to get my head around using CoffeeScript comprehensions as efficiently as possible.
I need to multiply several 1000s digits long integers as efficiently as possible in
Possible Duplicate: Best practices for efficiently storing md5 hashes in mysql We use Hex
Possible Duplicate: How do you efficiently generate a list of K non-repeating integers between
Is it possible in MySQL to insert a row into table2 automatically when a
Possible Duplicate: Rolling median algorithm in C Given that integers are read from a
I have a large amount of constantly incoming data (roughly 10,000 a minute, and

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.