Implement an efficient substring matching algorithm to find specific patterns within a massive stream of text.