Family of LZ compression algorithms is replacing some string in input stream with its reference (in dictionary, in the input stream itself if there were occurrences of the string before).

Let's imagine that there is an intellectual compression algorithm that works like LZ compression, replacing some code with reference. For instance, quick-sort implementation in any language is replaced with reference to some standard implementation. Some frequently repeatable patterns with DSL constructions.

I wonder if GitHub can be stored on the MicroSD card then :)

P.S. STEPS project by Alan Kay, with very high degree of reusability, has TCP stack implementation just in ~200 LOC.