-
-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Buffer functions have incomplete documentation right now. Additionally, the documentation that does exist is rather confusing (even to myself as I wrote them).
Ideally the documentation should provide a breakdown of the bytes in a table format, e.g. as an example:
| Byte | Modification | Shift |
|:----:|:------------:|:-----:|
| 0 | 0 | 8 |
| 1 | +128 | 0 |
Which would be the documentation for the p2Alt2 function:
public fun ByteBuf.p2Alt2(value: Int): ByteBuf {
writeByte(value shr 8)
writeByte(value + 128)
return this
}
I believe this is much easier to understand than trying to break down the modifications to each byte in text format, particularly for the more complex cases such as p4Alt* where there are four bytes to try to explain.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request