Add UTF8 String support to Readable/WritableSequentialData implementations
- Dominant language
- Java
- Stars
- 44
- Forks
- 15
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 12
Description
### Problem
Currently PBJ uses a mixture of code to work on UTF8 Strings in binary data. None of them have direct access to stored data so work via read/writeByte methods and hence will be slow. See `com.hedera.pbj.runtime.Utf8Tools`.
### Solution
Add UTF8 read write methods to `ReadableSequentialData` and `WritableSequentialData` implementations. Replace Utf8Tools usage with new methods. Is there a faster method than `new String(bytes,StandardCharsets.UTF_8);` used in `com.hedera.pbj.runtime.ProtoParserTools#readString`.
See https://github.com/real-logic/agrona and https://github.com/OpenHFT/Chronicle-Bytes for ideas for fast tricks.
We need to stay very compatible to Google Protobuf interpretation of UTF8, so we are byte and byte compatible.
Contributor guide
Assessment
This issue has not been assessed yet.