According to the documentation, there is no such function. Currently strict ByteStrings are presented as a pointer to the beginning of the pinned memory , offset, and length. So your implementation is the best way to do splice. However, you should be careful with splices, because bytestrings splicing takes up the same space as the original bytestring value. To avoid this, you can copy byte splicing, but this is not always necessary.
Samvel truzyan
source share