Added very simple match finding and encoding.
The encoder simply chooses the longest match without considering encoding prices.
The results are pretty nice already, though.