-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UTF8 decode on unpinned bytes #479
Comments
I think this would be a welcome addition (especially as it will only be promised internally). |
Looks reasonable to me. |
You probably want both For big enough |
I've opened a PR with this at #483. One thing I realized as I was doing this is that I need to provide a fallback when the SIMDUTF flag is off. I need to add a variant of the |
I've added the important missing stuff. |
Closed by #483. |
I have, in the
byteslice
library, a type that looks like this:This is the same thing as
ByteString
except that it doesn't require pinned memory and it cannot use memory that was allocated in C code. I'm trying to write this function (not intext
, in my library):The
text
library comes with a fast utf8 validation routine implemented in C++. However, it does not expose this in a way that lets me use it. To expose this, it would be sufficient to add this totext
:And a wrapper:
With this wrapper, it becomes possible to perform UTF-8 validation of unpinned
ByteArray#
at arbitrary starting points.If something like this were added to
text
, it could be exposed in an internal, unstable module. Let me know if this sounds like a welcome addition (and if it is, with some direction on where this should be exposed), and I can prepare a patch.The text was updated successfully, but these errors were encountered: