I'm searching for the best way to accomplish what's specified in the title. Let's say I have a file ( let's make it a text file for the sake of simplicity ) with a list of pre sorted numbers, such as 

```
    0 2 3 4 4 6 12 13 14 16 16 16 17 18 ...

```

I want to insert a new number in this list, let's say **5**, without loading everything into memory and perform the sorting on every item in the file again ( this is just an example, in my case I have a huge amount of data and loading everything into memory is not doable ) and without splitting the file into the "lower bound" and "upper bound" parts ( temporary files ) to rejoin them with the number in the middle.
Is there any way to just insert something in a given position of a file and making everything from that offset on just "shift" for the appropriate number of bytes ?

Solutions with both standard functions such as (f)open, (f)write, etc and Windows specific APIs ( memory mapped files too ) are welcomed.