Conversion of lzvn_encode to C
Conversion of lzvn_encode to C