C++ styled code for LZSS algorithm