C-Style conversion of lzvn_decode