@@ -138,6 +138,8 @@ readWord16be s@(S bs o) n
139 | otherwise = error "readWord16be: tried to read more than 16 bits"
139 | otherwise = error "readWord16be: tried to read more than 16 bits"
141+readWithoutOffset :: (Bits a, Num a)
142+ => S -> (a -> Int -> a) -> (a -> Int -> a) -> Int -> T a S
141readWithoutOffset s@(S bs o) shifterL shifterR n
143readWithoutOffset s@(S bs o) shifterL shifterR n
142 | o /= 0 = error "readWithoutOffset: there is an offset"
144 | o /= 0 = error "readWithoutOffset: there is an offset"
@@ -161,6 +163,8 @@ readWithoutOffset s@(S bs o) shifterL shifterR n
161 w = msegs .|. last
163 w = msegs .|. last
162 in w :*: incS s n
164 in w :*: incS s n
166+readWithOffset :: (Bits a, Num a)
167+ => S -> (a -> Int -> a) -> (a -> Int -> a) -> Int -> T a S
164readWithOffset s@(S bs o) shifterL shifterR n
168readWithOffset s@(S bs o) shifterL shifterR n
165 | n <= 64 = let bits_in_msb = 8 - o
169 | n <= 64 = let bits_in_msb = 8 - o
166 (n',top) = (n - bits_in_msb
170 (n',top) = (n - bits_in_msb