The "uint8_t* in_buf" argument to heatshrink_encoder_sink() and heatshrink_decoder_sink() should be "const uint8_t* in_buf". The actual implementation does not change the data pointed to by that argument, so the signature should indicate accordingly. That way the caller can be confident the input data will not be modified without having to examine the code.
The "uint8_t* in_buf" argument to heatshrink_encoder_sink() and heatshrink_decoder_sink() should be "const uint8_t* in_buf". The actual implementation does not change the data pointed to by that argument, so the signature should indicate accordingly. That way the caller can be confident the input data will not be modified without having to examine the code.