moq-wg / moq-transport

draft-ietf-moq-transport
Other
70 stars 16 forks source link

Isn't spending two bytes for STREAM_HEADER_GROUP a bit wasteful? #464

Open huitema opened 2 weeks ago

huitema commented 2 weeks ago

The "message" syntax is defined as:

   MOQT Message {
     Message Type (i),
     Message Payload (..),
   }

The unidirectional streams start with messages of one of the types:

              +======+======================================+
              |   ID | Messages                             |
              +======+======================================+
              |  0x0 | OBJECT_STREAM (Section 6.11.2)       |
              +------+--------------------------------------+
              | 0x50 | STREAM_HEADER_TRACK (Section 6.11.3) |
              +------+--------------------------------------+
              | 0x51 | STREAM_HEADER_GROUP (Section 6.11.3) |
              +------+--------------------------------------+

When encoded as a varint, the codes 0x50 and 0x51 take two bytes -- 0x4050 or 0x4051. That seems a tiny bit wasteful. How about changing those codes to 0x30 and 0x31, which encode on a single byte?