pad :: Int64 -> Int64 -> L.ByteString -> [V.Vector Word64]
pad dataLen blockLen xs
    | dataLen == 0 || L.null xs = [V.fromList [0x8000000000000000, 0,0,0,0,0,0, lengthPad + 1]] 
    | partialBlockLen == 0 = [parseBlock xs, V.fromList [0x8000000000000000, 0,0,0,0,0,0, lengthPad + 1]]  
    | L.length onePadded <= (blockByteLen - 8) = [V.unsafeUpdate (parseBlock fullBlock) (V.singleton (7, lengthPad + 1))]
    | otherwise = [parseBlock fullBlock, V.fromList [0,0,0,0,0,0,0, lengthPad + 2]]
    where 
          onePadded = appendOne xs partialBlockLen
          fullBlock = L.append onePadded (L.take (blockByteLen - L.length onePadded) zeroes) 
          zeroes = L.repeat 0x00
          blockByteLen = blockLen `div` 8
          partialBlockLen = dataLen `rem` blockLen
          lengthPad = fromIntegral $ dataLen `div` blockLen
pad :: Int64 -> Int64 -> L.ByteString -> [V.Vector Word64]
pad dataLen blockLen xs
    | dataLen == 0 || L.null xs = [V.fromList [0x8000000000000000, 0,0,0,0,0,0, lengthPad + 1]] 
    | partialBlockLen == 0 = [parseBlock xs, V.fromList [0x8000000000000000, 0,0,0,0,0,0, lengthPad + 1]]  
    | L.length onePadded <= (blockByteLen - 8) = [V.unsafeUpdate (parseBlock fullBlock) (V.singleton (7, lengthPad + 1))]
    | otherwise = [parseBlock fullBlock, V.fromList [0,0,0,0,0,0,0, lengthPad + 2]]
    where 
          onePadded = appendOne xs partialBlockLen
          fullBlock = L.append onePadded (L.take (blockByteLen - L.length onePadded) zeroes) 
          zeroes = L.repeat 0x00
          blockByteLen = blockLen `div` 8
          partialBlockLen = dataLen `rem` blockLen
          lengthPad = fromIntegral $ dataLen `div` blockLen
pad dataLen blockLen xs
    | dataLen == 0 || L.null xs = [V.fromList [0x8000000000000000, 0,0,0,0,0,0, lengthPad + 1]] 
    | partialBlockLen == 0 = [parseBlock xs, V.fromList [0x8000000000000000, 0,0,0,0,0,0, lengthPad + 1]]  
    | L.length onePadded <= (blockByteLen - 8) = [V.unsafeUpdate (parseBlock fullBlock) (V.singleton (7, lengthPad + 1))]
    | otherwise = [parseBlock fullBlock, V.fromList [0,0,0,0,0,0,0, lengthPad + 2]]
    where 
          onePadded = appendOne xs partialBlockLen
          fullBlock = L.append onePadded (L.take (blockByteLen - L.length onePadded) zeroes) 
          zeroes = L.repeat 0x00
          blockByteLen = blockLen `div` 8
          partialBlockLen = dataLen `rem` blockLen
          lengthPad = fromIntegral $ dataLen `div` blockLen