描述

The short item format packs the item size, type, and tag into the first byte. The first byte may be followed by 0, 1, 2, or 4 optional data bytes depending on the size of the data.

短项格式数据长度项类型项标签压缩在第一个字节中。根据数据长度,该字节后可以跟随 0、1、2 或 4 个可选的数据字节

格式

6.2.2.2 Short Items - 图1

注释

  • A short item tag doesn’t have an explicit value for bSize associated with it. Instead, the value of the item data part determines the size of the item. That is, if the item data can be represented in one byte, then the data part can be specified as 1 byte, although this is not required.

    短项标签没有与之关联的显式 bSize 值。相反,项数据部分的值决定了项的长度。也就是说,如果项数据可以用一个字节表示,那么数据部分可以指定为 1 个字节,但这并非强制要求。

  • If a large data item is expected, it can still be abbreviated if all of its high-order bits are zero. For example, a 32-bit part in which bytes 1, 2, and 3 are all 0 can be abbreviated as a single byte.

    如果一个数据项的值很大,但只要其所有高位字节均为零,它仍然可以进行缩写。例如,一个 32 位的组成部分,如果其第 1、2、3 字节均为 0,则可以缩写为一个单字节。

  • There are three categories of short item tags: Main, Global, and Local. The item type (bType) specifies the tag category and consequently the item’s behavior.

    短项标签共有3个项标签主项 (Main)全局项 (Global)局部项 (Local)项类型 (bType) 指定了标签的类别,从而决定了项的行为。