-- | Encode some numbers with a given width. The number of elements in the list may not exceed 
-- the amount of numbers allowed for this width and the numbers in the list may not exceed the
-- upper bound for this width. These preconditions are not checked!
encode :: Width -> [Word64] -> Word64                         
encode w [] = rotateR (fromIntegral (fromEnum w)) (64 - (width w * count w))
encode :: Width -> [Word64] -> Word64
encode w [] = rotateR (fromIntegral (fromEnum w)) (64 - (width w * count w))
encode w [] = rotateR (fromIntegral (fromEnum w)) (64 - (width w * count w))