Can't understand the task Hyper-optimized Telemetry

Sorry if I’m asking the question in the wrong place, but I don’t know where I can ask about the task description. Please tell me what the additional bytes are in the description of the Hyper-optimized Telemetry in C# track Hyper-optimized Telemetry in C# on Exercism.
Thanks in advance

1 Like

Unfortunately, the exercise description is quite convoluted, so sorry about that!

As for your actual question, the instruction state:

The complete buffer comprises a byte indicating the number of additional bytes in the buffer (prefix byte ) followed by the bytes holding the integer (payload bytes ).

So suppose that the payload bytes are four bytes (these are the additional bytes), then the number of additional bytes is 4 and the prefix byte is also 4. If the payload bytes are two bytes, the prefix byte is 2. For signed numbers, you’ll need to store the additional bytes a bit differently.

2 Likes

Hello. Thanks for previous answer. I have another one. In theToBuffer_Zero test, the prefix byte is 0x2, which seems to be correct according to the table in the description. But for some reason, the prefix byte in FromBuffer_Zero is 0xfe. Similarly in ToBuffer_upper_short and FromBuffer_upper_short tests. I assume this is a bug and suggest a fix. I tried to make a PR, but it was automatically closed. Please, tell me, if I’m right or not. Thank you in advance.

1 Like

I currently don’t have much time to look into this, sorry. The exercise itself is just incredibly confusing. I wonder if we should actually deprecate it.

2 Likes

I see. Thank you!