lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

> Well for me some years ago I had to code up a (very) fast CCITT group
> 3 fax decoder that needed to handle a huffman compressed token stream
> .. with tokens varying in length from 3 to 13 bits. Lots of shifts
> and masking involved here, which were table driven by shift factors
> all over the place. Transcoding that (from C) to Lua without shifts
> would involve working though all the tables replacing the shifts with
> powers of two factors, then searching out all functions that had shift
> factors as arguments etc. Certainly more work than would be involved
> if Lua had shift operators. That said, for this project I cannot
> recall needing arithmetic shift, just logical.

The point of my question was whether Lua should have logical or
arithmetic shift, not whether Lua should have shifts. This case
seems to favor logical shifts.

-- Roberto