Can I take two strings and produce a third, "small" string that contains all their information?
This question has obvious variants and generalizations, so let me describe a simple example of what I'm thinking about.
I would like to be able to combine strings of the same length (although if letting the length vary makes the job easier that's more desirable, although I would guess it's in fact a harder problem) yet maintain the ability to recover the original strings efficiently. The solution does not have to be optimal and my main concern is storage (length of the storage string).
Consider the randomly generated strings $s_1 = 123abc$ and $s_2 = 789xyz$, both with length $6$. Can I create a function that $f$ that maps $s_1$ and $s_2$ to a string $s$ of length $6$ that also preserves the information of $s_1$ and $s_2$? That is can I recover $s_1$ and $s_2$ with some function of $s$?
Just messing around with it, my intuition and says no. If the answer was yes, then it appears as if we could store an infinite amount of information in a finite space. So if that thinking is correct, then I'm curious if we can contain the information of $s_1$ and $s_2$ in a string $s$ of length strictly less than $12$? I say $12$, because I'm motivated by what I believe to be the fact that a concatentation like $s = s_1s_2$ would preserve all information of $s_1$ and $s_2$.
Tangentially, I'm unfamiliar with this topic, but I believe it to be part of information theory and I bet what I'm talking about has a specific name. So if someone could point me in that direction I would be appreciative. Furthermore, I'm wondering: could store strings efficiently via some other mechanism than just a resultant string? Thank you!