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:
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.
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:
Which would be the documentation for the p2Alt2 function:
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.