Data structures – What is the most effective way to store a digital range?

This question is about the number of bits required to store a range. In other words, for a given number of bits, what is the maximum range that can be stored and how?

Let's say we wanted to store a sub-range in the range 0-255.

So, for example, 45-74.

We can store the above example as two unsigned bytes, but it seems to me that there must be some redundancy of information. We know that the second value is larger than the first. Therefore, in the case where the first value is large, fewer bits are required for the second value and in the case where the second value is large, fewer bits are required for the first value.

I suspect that any compression technique would produce a marginal result, so it would be better to ask "what is the maximum range that can be stored in a byte?". This should be larger than what is achievable by storing the two numbers separately.

Are there standard algorithms for doing this kind of thing?