[Haskell-cafe] Abstraction leak
Andrew Coppin
andrewcoppin at btinternet.com
Sun Jul 1 10:48:29 EDT 2007
Bulat Ziganshin wrote:
> Hello Andrew,
>
>
>> I see. So build a table of codes and bitmasks and test against that...
>>
>
> decodeSymbol = do
> n <- returnNextNBits MaxBits -- this operation doesn't forward input pointer!
> symbol <- table1 ! n
> bits <- table2 ! symbol
> skipNBits bits
> return symbol
>
I see.
While we're on the subject... am I the first person to notice that
Haskell doesn't appear to have much support for fiddling with streams of
bits?
More information about the Haskell-Cafe
mailing list