decodeBE32 :: ByteString -> Word32
decodeBE32 x
  | B.length x /= 4 = error "Invalid length!"
  | otherwise = either (error "Could not decode length!") id (decode x)
decodeBE32 :: ByteString -> Word32
decodeBE32 x
  | B.length x /= 4 = error "Invalid length!"
  | otherwise = either (error "Could not decode length!") id (decode x)
decodeBE32 x
  | B.length x /= 4 = error "Invalid length!"
  | otherwise = either (error "Could not decode length!") id (decode x)