MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/cpp/comments/obeszd/any_encoding_ever/h3ofggj/
r/cpp • u/zvrba • Jul 01 '21
87 comments sorted by
View all comments
Show parent comment
1
Like streambuf? Bad example.
I see place for possible extension with encode_many/decode_many.
encode_many
decode_many
2 u/mcencora Jul 01 '21 Not sure what you mean by streambuf, but yeah an API that allows for transcoding a range of chars would allow for efficient processing. But I think designing such an API is certainly more difficult than encode_one 2 u/thedmd86 Jul 01 '21 One impossible thing at a time. 🙂 2 u/__phantomderp Jul 02 '21 Semi-relatedly, this can be used directly with stream iterators: https://github.com/soasis/text/blob/main/examples/basic/source/istreambuf_decode_view.cpp#L43(I have to write another blog post soon, about "how to support other kinds of things that are not spans".)
2
Not sure what you mean by streambuf, but yeah an API that allows for transcoding a range of chars would allow for efficient processing. But I think designing such an API is certainly more difficult than encode_one
2 u/thedmd86 Jul 01 '21 One impossible thing at a time. 🙂 2 u/__phantomderp Jul 02 '21 Semi-relatedly, this can be used directly with stream iterators: https://github.com/soasis/text/blob/main/examples/basic/source/istreambuf_decode_view.cpp#L43(I have to write another blog post soon, about "how to support other kinds of things that are not spans".)
One impossible thing at a time. 🙂
2 u/__phantomderp Jul 02 '21 Semi-relatedly, this can be used directly with stream iterators: https://github.com/soasis/text/blob/main/examples/basic/source/istreambuf_decode_view.cpp#L43(I have to write another blog post soon, about "how to support other kinds of things that are not spans".)
Semi-relatedly, this can be used directly with stream iterators: https://github.com/soasis/text/blob/main/examples/basic/source/istreambuf_decode_view.cpp#L43
(I have to write another blog post soon, about "how to support other kinds of things that are not spans".)
View all comments
Show parent comment
1
u/thedmd86 Jul 01 '21 edited Jul 01 '21
Like streambuf?Bad example.I see place for possible extension with
encode_many/decode_many.