⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

encode_tag

Function encode_tag 

Source
pub fn encode_tag(
    class: TagClass,
    constructed: bool,
    number: u8,
    out: &mut Vec<u8>,
)
Expand description

Encode a tag byte (or bytes for high-tag-number form).

For tags 0..=30, a single byte suffices: [class << 6 | constructed << 5 | tag_number]

High-tag-number form (tag >= 31) is supported but uncommon.