here's a suggestion for optimizing this method: case expressions are generally slower than doing a hash lookup so when  a case statement is used within a critical path for performance we can refactor this with a hash & closures which has been working well in my experience. example:

```ruby
string_decoder = lambda do |body|
  body.pack("C*")[0..-2]
end

ID_DECODER = {
  0 => string_decoder
  2 => string_decoder
  3 => string_decoder
  4 => string_decoder
  5 => string_decoder
  256 => string_decoder
  ...
end

def get_values(id, value)
  ID_DECODER[id].call(value)
end
```