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,