z********i 发帖数: 60 | 1 I need to write some bits to a stream, but not 1 byte, such as write a value
of 3 to a stream only occupy 2 bits. Is there any comments on it?
Thanks | g*****g 发帖数: 34805 | 2 You need to specify your request more clearly. Encoding is always dependent on
your specific application.
For example, if all are 0-3, you can use 2 bit coding and pack 4 values into
one byte.
【在 z********i 的大作中提到】 : I need to write some bits to a stream, but not 1 byte, such as write a value : of 3 to a stream only occupy 2 bits. Is there any comments on it? : Thanks
|
|