add ByteString
use unsafeUseAsCStringLen instead of useAsCStringLen and rename function name