📎 6.2 Representing Event Codes -------------------------------------------------------------------------------- 001 Each event code is represented by a sequence of 1 to 3 parts that 002 uniquely identify an event. Event code parts are encoded in order 003 starting with the first part followed by subsequent parts. 004 005 The i-th part of an event code is encoded as an n-bit unsigned 006 integer (7.1.9 n-bit Unsigned Integer) where n is ceil(log_2 m) 007 and m is the number of distinct values used as the i-th part 008 of its own and all its sibling event codes in the current grammar. 009 Two event codes are siblings at the i-th part if and only if they 010 share the same valies in all preceding parts. 011 All event codes are siblings at the first part. 012 013 If there is only one distinct value for a given part, the part 014 is omitted (i.e.. encoded in log_2 1 bits = 0 bits = 0 bytes). 015 016 For example, the eight event codes shown in the DocContent 017 grammar above have values ranging form 0 to 5 for the first part. 018 Six distinct values are needed to identify the first part of 019 these event codes. Therefore, the first part can be encoded as an 020 n-bit unsigned integer where n = ceil(log_2 6) = 3. In the same 021 fashion, the second and third part (if present) are represented as 022 n-bit unsigned integers where n is ceil (log_2 2) = 1 and 023 ceil(log_2 2) = 1 respectively. 024 025 When the value of the compression option is false and bit-packed 026 alignment is used, n-bit unsigned integers are represented using 027 n bits. The first table below illustrates how the event codes of 028 each event matched by the DocContent grammar above are represented 029 in this case. 030 031 When the value of compression option is true, or either byte- 032 alignment or pre-compression alignment option is used, n-bit 033 unsigned integers are represented using the minimum number of 034 bytes required to store n bits. The second table below illustrates 035 how the event codes of each event matched by the DocContent grammar 036 above are represented in this case. 📎 Example event code encoding table{ 📎 Example event code encoding when EXI compression is not in effect and bit-packed alignment is used header{ th{"Event" } th{"Part values" } th{"Event Code Encoding" } th{"# bits" } tr{ td{SE("A") } td{ part{0 } part{ } part{ } } td{0 0 0 } td{3 } } tr{ td{SE("B") } td{ part{1 } part{ } part{ } } td{0 0 1 } td{3 } } tr{ td{SE("C") } td{ part{2 } part{ } part{ } } td{0 1 0 } td{3 } } tr{ td{SE("D") } td{ part{3 } part{ } part{ } } td{0 1 1 } td{3 } } tr{ td{SE((_*_)) } td{ part{4 } part{ } part{ } } td{1 0 0 } td{3 } } tr{ td{DT } td{ part{5 } part{0 } part{ } } td{1 0 1 0 } td{4 } } tr{ td{CM } td{ part{5 } part{1 } part{0 } } td{1 0 1 1 0 } td{5 } } tr{ td{PI } td{ part{5 } part{1 } part{1 } } td{1 0 1 1 1 } td{5 } } tr{ td{"# distinct values(m)" } td{ part{6 } part{2 } part{2 } } td{ } td{ } } tr{ td{"# bits per part ceil(log_2 m)" } td{ part{3 } part{1 } part{1 } } td{ } td{ } } } } table{ 📎 Example event code encoding when EXI compression is in effect, or either byte-alignment or pre-compression alignment option is used header{ th{"Event" } th{"Part values" } th{"Event Code Encoding" } th{"# bytes" } tr{ td{SE("A") } td{ part{0 } part{ } part{ } } td{0 0 0 0 0 0 0 0 } td{1 } } tr{ td{SE("B") } td{ part{1 } part{ } part{ } } td{0 0 0 0 0 0 0 1 } td{1 } } tr{ td{SE("C") } td{ part{2 } part{ } part{ } } td{0 0 0 0 0 0 1 0 } td{1 } } tr{ td{SE("D") } td{ part{3 } part{ } part{ } } td{0 0 0 0 0 0 1 1 } td{1 } } tr{ td{SE((_*_)) } td{ part{4 } part{ } part{ } } td{0 0 0 0 0 1 0 0 } td{1 } } tr{ td{DT } td{ part{5 } part{0 } part{ } } td{0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 } td{2 } } tr{ td{CM } td{ part{5 } part{1 } part{0 } } td{0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 } td{3 } } tr{ td{PI } td{ part{5 } part{1 } part{1 } } td{0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 } td{3 } } tr{ td{"# distinct values(m)" } td{ part{6 } part{2 } part{2 } } td{ } td{ } } tr{ td{"# bytes per part ceil( (log_2 m )/ 8)" } td{ part{1 } part{1 } part{1 } } td{ } td{ } } } }
006002
Folders and files
Name | Name | Last commit date | ||
---|---|---|---|---|
parent directory.. | ||||