Arithmetic Enoder/Decoder for generic data compression