fixed lz encoding bug in encoding class