finish lz77 and part ex-1.c