I did this, and it was great at first. Then I needed more socks, so I bought another batch. Then I had a mix of worn socks and brand new socks. They might look the same at first, but if you take a closer look, the older ones are a little lighter in color and the texture isn’t the same. I later bought a third batch. So now I have a mix of new, old, and really old socks. It actually takes more effort to match socks now than when I had many different socks.
I see this advice posted all the time, so I guess most people don’t care if their socks on each foot are a different level of worn, but it bothers me.
An example I found: the string of digits 0123456789 occurs at position 17387594880. In this case, it took 11 digits to describe where to find a 10-digit number.
So I think such an algorithm would technically work, but your “start digit” would be so large it would use more data than just sending the raw file data. Not to mention the impossible amount of computing power needed.