find the lempel-ziv source code for the binary source sequence

0001001000000110000100000001000000101000010000001101000 00001100.

Recover the original sequence back from the Lempel-Ziv source code (Hint : you require two passes of the binary sequence to decide on the size of the dictionary)