buildWireByteString :: B.ByteString -> BB.Builder
buildWireByteString bs =
  BBE.word32Host (fromIntegral len)
  <>
  BB.byteString bs
  <>
  mconcat (replicate padding (BB.int8 0))
  where
    len = B.length bs
    size = 4 * (1 + ((len -1) `div` 4))
    padding = size - len

-- | Encode an individual argument
buildWireByteString :: B.ByteString -> BB.Builder
buildWireByteString bs =
  BBE.word32Host (fromIntegral len)
  <>
  BB.byteString bs
  <>
  mconcat (replicate padding (BB.int8 0))
  where
    len = B.length bs
    size = 4 * (1 + ((len -1) `div` 4))
    padding = size - len

-- | Encode an individual argument
buildWireByteString bs =
  BBE.word32Host (fromIntegral len)
  <>
  BB.byteString bs
  <>
  mconcat (replicate padding (BB.int8 0))
  where
    len = B.length bs
    size = 4 * (1 + ((len -1) `div` 4))
    padding = size - len

-- | Encode an individual argument