idnits 2.17.1 draft-lhomme-cellar-ebml-00.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The document seems to lack an IANA Considerations section. (See Section 2.2 of https://www.ietf.org/id-info/checklist for how to handle the case when there are no actions for IANA.) == There are 2 instances of lines with non-RFC6890-compliant IPv4 addresses in the document. If these are example addresses, they should be changed. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (July 6, 2016) is 2851 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) -- Looks like a reference, but probably isn't: '1' on line 1151 -- Looks like a reference, but probably isn't: '2' on line 1153 -- Looks like a reference, but probably isn't: '3' on line 1155 -- Looks like a reference, but probably isn't: '4' on line 1157 -- Looks like a reference, but probably isn't: '5' on line 1159 -- Looks like a reference, but probably isn't: '6' on line 1161 == Unused Reference: 'RFC2119' is defined on line 1138, but no explicit reference was found in the text == Unused Reference: 'RFC2279' is defined on line 1145, but no explicit reference was found in the text -- Obsolete informational reference (is this intentional?): RFC 2279 (Obsoleted by RFC 3629) Summary: 1 error (**), 0 flaws (~~), 4 warnings (==), 8 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 cellar S. Lhomme 3 Internet-Draft 4 Intended status: Standards Track D. Rice 5 Expires: January 7, 2017 July 6, 2016 7 Extensible Binary Meta Language 8 draft-lhomme-cellar-ebml-00 10 Abstract 12 This document defines the Extensible Binary Meta Language (EBML) 13 format as a genearlized file format for any type of data in a 14 hierarchical form. EBML is designed as a binary equivalent to XML 15 and utilizes a storage-efficient approach to building nested Elements 16 with identifiers, lengths, and values. Similar to how an XML Schema 17 defines the structure and semantics of an XML Document, this document 18 defines an EBML Schema to convey the semantics of an EBML Document. 20 Status of This Memo 22 This Internet-Draft is submitted in full conformance with the 23 provisions of BCP 78 and BCP 79. 25 Internet-Drafts are working documents of the Internet Engineering 26 Task Force (IETF). Note that other groups may also distribute 27 working documents as Internet-Drafts. The list of current Internet- 28 Drafts is at http://datatracker.ietf.org/drafts/current/. 30 Internet-Drafts are draft documents valid for a maximum of six months 31 and may be updated, replaced, or obsoleted by other documents at any 32 time. It is inappropriate to use Internet-Drafts as reference 33 material or to cite them other than as "work in progress." 35 This Internet-Draft will expire on January 7, 2017. 37 Copyright Notice 39 Copyright (c) 2016 IETF Trust and the persons identified as the 40 document authors. All rights reserved. 42 This document is subject to BCP 78 and the IETF Trust's Legal 43 Provisions Relating to IETF Documents 44 (http://trustee.ietf.org/license-info) in effect on the date of 45 publication of this document. Please review these documents 46 carefully, as they describe your rights and restrictions with respect 47 to this document. Code Components extracted from this document must 48 include Simplified BSD License text as described in Section 4.e of 49 the Trust Legal Provisions and are provided without warranty as 50 described in the Simplified BSD License. 52 Table of Contents 54 1. EBML specifications . . . . . . . . . . . . . . . . . . . . . 2 55 1.1. Introduction . . . . . . . . . . . . . . . . . . . . . . 2 56 1.2. Notation and Conventions . . . . . . . . . . . . . . . . 3 57 1.3. Security Considerations . . . . . . . . . . . . . . . . . 3 58 1.4. Structure . . . . . . . . . . . . . . . . . . . . . . . . 4 59 1.5. Variable Size Integer . . . . . . . . . . . . . . . . . . 4 60 1.5.1. VINT_WIDTH . . . . . . . . . . . . . . . . . . . . . 4 61 1.5.2. VINT_MARKER . . . . . . . . . . . . . . . . . . . . . 4 62 1.5.3. VINT_DATA . . . . . . . . . . . . . . . . . . . . . . 4 63 1.5.4. VINT Examples . . . . . . . . . . . . . . . . . . . . 5 64 1.6. Element ID . . . . . . . . . . . . . . . . . . . . . . . 5 65 1.7. Element Data Size . . . . . . . . . . . . . . . . . . . . 6 66 1.8. EBML Element Types . . . . . . . . . . . . . . . . . . . 8 67 1.9. EBML Document . . . . . . . . . . . . . . . . . . . . . . 11 68 1.9.1. EBML Header . . . . . . . . . . . . . . . . . . . . . 12 69 1.9.2. EBML Body . . . . . . . . . . . . . . . . . . . . . . 12 70 1.10. EBML Stream . . . . . . . . . . . . . . . . . . . . . . . 13 71 1.11. Elements semantic . . . . . . . . . . . . . . . . . . . . 13 72 1.11.1. EBML Schema . . . . . . . . . . . . . . . . . . . . 13 73 1.11.2. EBML Header Elements . . . . . . . . . . . . . . . . 22 74 1.11.3. Global elements (used everywhere in the format) . . 25 75 2. References . . . . . . . . . . . . . . . . . . . . . . . . . 26 76 2.1. Normative References . . . . . . . . . . . . . . . . . . 27 77 2.2. Informative References . . . . . . . . . . . . . . . . . 27 78 2.3. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 27 79 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 27 81 1. EBML specifications 83 1.1. Introduction 85 EBML, short for Extensible Binary Meta Language, specifies a binary 86 and octet (byte) aligned format inspired by the principle of XML. 88 The goal of the EBML Specification is to define a generic, binary, 89 space-efficient format that may be utilized to define more complex 90 formats (such as containers for multimedia content) using an EBML 91 Schema. The definition of the EBML format recognizes the idea behind 92 HTML and XML as a good one: separate structure and semantics allowing 93 the same structural layer to be used with multiple, possibly widely 94 differing semantic layers. Except for the EBML Header and a few 95 global elements this specification does not define particular EBML 96 format semantics; however this specification is intended to define 97 how other EBML-based formats may be defined. 99 EBML uses a simple approach of building Elements upon three pieces of 100 data (tag, length, and value) as this approach is well known, easy to 101 parse, and allows selective data parsing. The EBML structure 102 additionally allows for hierarchical arrangement to support complex 103 structural formats in an efficient manner. 105 1.2. Notation and Conventions 107 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 108 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 109 document are to be interpreted as described in 110 [RFC2119](). 112 1.3. Security Considerations 114 EBML itself does not offer any kind of security. It has nothing to 115 do with authentication, it does not provide confidentiality, only 116 marginally useful and effective data integrity options (CRC 117 elements). 119 EBML does not provide any kind of authorization. 121 Even if the semantic layer offers any kind of encryption, EBML itself 122 may leak information at both the semantic layer (as declared via the 123 DocType element) and within the EBML structure (you can derive the 124 presence of EBML elements even with an unknown semantic layer with a 125 heuristic approach; not without errors, of course, but with a certain 126 degree of confidence). 128 Attacks on an EBML reader may include: - Invalid Element IDs that are 129 longer than the limit stated in the EBMLMaxIDLength Element of the 130 EBML Header. - Invalid Element IDs that are not encoded in the 131 shortest-possible way. - Invalid Element IDs comprised of reserved 132 values. - Invalid Element Data Size values that are longer than the 133 limit stated in the EBMLMaxSizeLength Element of the EBML Header. - 134 Invalid Element Data Size values (e.g. extending the length of the 135 Element beyond the scope of the Parent Element; possibly triggering 136 access-out-of-bounds issues). - Very high lengths in order to force 137 out-of-memory situations resulting in a denial of service, access- 138 out-of-bounds issues etc. - Missing Elements that are mandatory and 139 have no declared default value. - Usage of "0x00" octets in EBML 140 Elements with a string type. - Usage of invalid UTF-8 encoding in 141 EBML Elements of UTF-8 type (e.g. in order to trigger access-out-of- 142 bounds or buffer overflow issues). - Usage of invalid data in EBML 143 Elements with a date type. 145 1.4. Structure 147 EBML uses a system of Elements to compose an EBML Document. Elements 148 incorporate three parts: an Element ID, an Element Data Size, and 149 Element Data. The Element Data, which is described by the Element 150 ID, may include either binary data or one or many other Elements. 152 1.5. Variable Size Integer 154 The Element ID and Element Data Size are both encoded as a Variable 155 Size Integer, developed according to a UTF-8 like system. The 156 Variable Size Integer is composed of a VINT_WIDTH, VINT_MARKER, and 157 VINT_DATA, in that order. Variable Size Integers shall be referred 158 to as VINT for shorthand. 160 1.5.1. VINT_WIDTH 162 Each Variable Size Integer begins with a VINT_WIDTH which consists of 163 zero or many zero-value bits. The count of consecutive zero-values 164 of the VINT_WIDTH plus one equals the length in octets of the 165 Variable Size Integer. For example, a Variable Size Integer that 166 starts with a VINT_WIDTH which contains zero consecutive zero-value 167 bits is one octet in length and a Variable Size Integer that starts 168 with one consecutive zero-value bit is two octets in length. The 169 VINT_WIDTH MUST only contain zero-value bits or be empty. 171 1.5.2. VINT_MARKER 173 The VINT_MARKER serves as a separator between the VINT_WIDTH and 174 VINT_DATA. Each Variable Size Integer MUST contain exactly one 175 VINT_MARKER. The VINT_MARKER MUST be one bit in length and contain a 176 bit with a value of one. The first bit with a value of one within 177 the Variable Size Integer is the VINT_MARKER. 179 1.5.3. VINT_DATA 181 The VINT_DATA portion of the Variable Size Integer includes all data 182 that follows (but not including) the VINT_MARKER until end of the 183 Variable Size Integer whose length is derived from the VINT_WIDTH. 184 The bits required for the VINT_WIDTH and the VINT_MARKER combined use 185 one bit per octet of the total length of the Variable Size Integer. 186 Thus a Variable Size Integer of 1 octet length supplies 7 bits for 187 VINT_DATA, a 2 octet length supplies 14 bits for VINT_DATA, and a 3 188 octet length supplies 21 bits for VINT_DATA. If the number of bits 189 required for VINT_DATA are less than the bit size of VINT_DATA, then 190 VINT_DATA may be zero-padded to the left to a size that fits. The 191 VINT_DATA value MUST be expressed a big-endian unsigned integer. 193 1.5.4. VINT Examples 195 This table shows examples of Variable Size Integers at widths of 1 to 196 5 octets. The Representation column depicts a binary expression of 197 Variable Size Integers where VINT_WIDTH is depicted by '0', the 198 VINT_MARKER as '1', and the VINT_DATA as 'x'. 200 +-------------+------+----------------------------------------------+ 201 | Octet Width | Size | Representation | 202 +-------------+------+----------------------------------------------+ 203 | 1 | 2^7 | 1xxx xxxx | 204 | 2 | 2^14 | 01xx xxxx xxxx xxxx | 205 | 3 | 2^21 | 001x xxxx xxxx xxxx xxxx xxxx | 206 | 4 | 2^28 | 0001 xxxx xxxx xxxx xxxx xxxx xxxx xxxx | 207 | 5 | 2^35 | 0000 1xxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx | 208 | | | xxxx | 209 +-------------+------+----------------------------------------------+ 211 Note that data encoded as a Variable Size Integer may be rendered at 212 octet widths larger than needed to store the data. In this table a 213 binary value of 0b10 is shown encoded as different Variable Size 214 Integers with widths from one octet to four octet. All four encoded 215 examples have identical semantic meaning though the VINT_WIDTH and 216 the padding of the VINT_DATA vary. 218 +--------------+-------------+--------------------------------------+ 219 | Binary Value | Octet Width | As Represented in Variable Size | 220 | | | Integer | 221 +--------------+-------------+--------------------------------------+ 222 | 10 | 1 | 1000 0010 | 223 | 10 | 2 | 0100 0000 0000 0010 | 224 | 10 | 3 | 0010 0000 0000 0000 0000 0010 | 225 | 10 | 4 | 0001 0000 0000 0000 0000 0000 0000 | 226 | | | 0010 | 227 +--------------+-------------+--------------------------------------+ 229 1.6. Element ID 231 The Element ID MUST be encoded as a Variable Size Integer. By 232 default, EBML Element IDs may be encoded in lengths from one octet to 233 four octets, although Element IDs of greater lengths may be used if 234 the octet length of the EBML Document's longest Element ID is 235 declared in the EBMLMaxIDLength Element of the EBML Header. The 236 VINT_DATA component of the Element ID MUST NOT be set to either all 237 zero values or all one values. The VINT_DATA component of the 238 Element ID MUST be encoded at the shortest valid length. For 239 example, an Element ID with binary encoding of 1011 1111 is valid, 240 whereas an Element ID with binary encoding of 0100 0000 0011 1111 241 stores a semantically equal VINT_DATA but is invalid because a 242 shorter VINT encoding is possible. The following table details this 243 specific example further: 245 +------------+-------------+----------------+-------------------+ 246 | VINT_WIDTH | VINT_MARKER | VINT_DATA | Element ID Status | 247 +------------+-------------+----------------+-------------------+ 248 | | 1 | 0111111 | Valid | 249 | 0 | 1 | 00000000111111 | Invalid | 250 +------------+-------------+----------------+-------------------+ 252 The octet length of an Element ID determines its EBML Class. 254 +------------+--------------+--------------------------------+ 255 | EBML Class | Octet Length | Number of Possible Element IDs | 256 +------------+--------------+--------------------------------+ 257 | Class A | 1 | 2^7 - 2 = 126 | 258 | Class B | 2 | 2^14 - 2^7 - 1 = 16,255 | 259 | Class C | 3 | 2^21 - 2^14 - 1 = 2,080,767 | 260 | Class D | 4 | 2^28 - 2^21 - 1 = 266,388,303 | 261 +------------+--------------+--------------------------------+ 263 1.7. Element Data Size 265 The Element Data Size expresses the length in octets of Element Data. 266 The Element Data Size itself MUST be encoded as a Variable Size 267 Integer. By default, EBML Element Data Sizes can be encoded in 268 lengths from one octet to eight octets, although Element Data Sizes 269 of greater lengths MAY be used if the octet length of the EBML 270 Document's longest Element Data Size is declared in the 271 EBMLMaxSizeLength Element of the EBML Header. Unlike the VINT_DATA 272 of the Element ID, the VINT_DATA component of the Element Data Size 273 is not required to be encoded at the shortest valid length. For 274 example, an Element Data Size with binary encoding of 1011 1111 or a 275 binary encoding of 0100 0000 0011 1111 are both valid Element Data 276 Sizes and both store a semantically equal value. 278 Although an Element ID with all VINT_DATA bits set to zero is 279 invalid, an Element Data Size with all VINT_DATA bits set to zero is 280 allowed for EBML Data Types which do not mandate a non-zero length. 281 An Element Data Size with all VINT_DATA bits set to zero indicates 282 that the Element Data of the Element is zero octets in length. Such 283 an Element is referred to as an Empty Element. If an Empty Element 284 has a "default" value declared then that default value MUST be 285 interpreted as the value of the Empty Element. If an Empty Element 286 has no "default" value declared then the semantic meaning of Empty 287 Element is defined as part of the definition of the EBML Element 288 Types. 290 An Element Data Size with all VINT_DATA bits set to one is reserved 291 as an indicator that the size of the Element is unknown. The only 292 reserved value for the VINT_DATA of Element Data Size is all bits set 293 to one. This rule allows for an Element to be written and read 294 before the size of the Element is known; however unknown Element Data 295 Size values SHOULD NOT be used unnecessarily. An Element with an 296 unknown Element Data Size MUST be a Master-element in that it 297 contains other EBML Elements as sub-elements. Master-elements MAY 298 only use an unknown size if the "unknownsizeallowed" attribute of the 299 EBML Schema is set to true. The end of a Master-element with unknown 300 size is determined by the beginning of the next element that is not a 301 valid sub-element of that Master-element. An Element with an unknown 302 Element Data Size is referred to as an "Unknown-Sized Element". 304 For Element Data Sizes encoded at octet lengths from one to eight, 305 this table depicts the range of possible values that can be encoded 306 as an Element Data Size. An Element Data Size with an octet length 307 of 8 is able to express a size of 2^56-2 or 72,057,594,037,927,934 308 octets (or about 72 petabytes). The maximum possible value that can 309 be stored as Element Data Size is referred to as "VINTMAX". 311 +--------------+----------------------+ 312 | Octet Length | Possible Value Range | 313 +--------------+----------------------+ 314 | 1 | 0 to 2^7-2 | 315 | 2 | 0 to 2^14-2 | 316 | 3 | 0 to 2^21-2 | 317 | 4 | 0 to 2^28-2 | 318 | 5 | 0 to 2^35-2 | 319 | 6 | 0 to 2^42-2 | 320 | 7 | 0 to 2^49-2 | 321 | 8 | 0 to 2^56-2 | 322 +--------------+----------------------+ 324 If the length of Element Data equals 2^(n*7)-1 then the octet length 325 of the Element Data Size MUST be at least n+1. This rule prevents an 326 Element Data Size from being expressed as a reserved value. For 327 example, an Element with an octet length of 127 MUST NOT be encoded 328 in an Element Data Size encoding with a one octet length. The 329 following table clarifies this rule by showing a valid and invalid 330 expression of an Element Data Size with a VINT_DATA of 127 (which is 331 equal to 2^(1*7)-1). 333 +------------+-------------+----------------+-----------------------+ 334 | VINT_WIDTH | VINT_MARKER | VINT_DATA | Element Data Size | 335 | | | | Status | 336 +------------+-------------+----------------+-----------------------+ 337 | | 1 | 1111111 | Reserved (meaning | 338 | | | | Unknown) | 339 | 0 | 1 | 00000001111111 | Valid (meaning 127 | 340 | | | | octets) | 341 +------------+-------------+----------------+-----------------------+ 343 1.8. EBML Element Types 345 Each defined EBML Element MUST have a declared Element Type. The 346 Element Type defines a concept for storing data that may be 347 constrained by length, endianness, and purpose. 349 +------------+------------------------------------------------------+ 350 | Element | Signed Integer | 351 | Data Type | | 352 +------------+------------------------------------------------------+ 353 | Endianness | Big-endian | 354 | Length | A Signed Integer Element MUST declare a length that | 355 | | is no greater than 8 octets. An Signed Integer | 356 | | Element with a zero-octet length represents an | 357 | | integer value of zero. | 358 | Definition | A Signed Integer stores an integer (meaning that it | 359 | | can be written without a fractional component) which | 360 | | may be negative, positive, or zero. Because EBML | 361 | | limits Signed Integers to 8 octets in length a | 362 | | Signed Element may store a number from | 363 | | -9,223,372,036,854,775,808 to | 364 | | +9,223,372,036,854,775,807. | 365 +------------+------------------------------------------------------+ 366 +------------+------------------------------------------------------+ 367 | Element | Unsigned Integer | 368 | Data Type | | 369 +------------+------------------------------------------------------+ 370 | Endianness | Big-endian | 371 | Length | A Unsigned Integer Element MUST declare a length | 372 | | that is no greater than 8 octets. An Unsigned | 373 | | Integer Element with a zero-octet length represents | 374 | | an integer value of zero. | 375 | Definition | An Unsigned Integer stores an integer (meaning that | 376 | | it can be written without a fractional component) | 377 | | which may be positive or zero. Because EBML limits | 378 | | Unsigned Integers to 8 octets in length an unsigned | 379 | | Element may store a number from 0 to | 380 | | 18,446,744,073,709,551,615. | 381 +------------+------------------------------------------------------+ 383 +------------+------------------------------------------------------+ 384 | Element | Float | 385 | Data Type | | 386 +------------+------------------------------------------------------+ 387 | Endianness | Big-endian | 388 | Length | A Float Element MUST declare of length of either 0 | 389 | | octets (0 bit), 4 octets (32 bit) or 8 octets (64 | 390 | | bit). A Float Element with a zero-octet length | 391 | | represents a numerical value of zero. | 392 | Definition | A Float Elements stores a floating-point number as | 393 | | defined in IEEE 754. | 394 +------------+------------------------------------------------------+ 396 +------------+------------------------------------------------------+ 397 | Element | String | 398 | Data Type | | 399 +------------+------------------------------------------------------+ 400 | Endianness | None | 401 | Length | A String Element may declare any length from zero to | 402 | | "VINTMAX". | 403 | Definition | A String Element may either be empty (zero-length) | 404 | | or contain Printable ASCII characters in the range | 405 | | of "0x20" to "0x7E". Octets with all bits set to | 406 | | zero may follow the string value when needed. | 407 +------------+------------------------------------------------------+ 408 +------------+------------------------------------------------------+ 409 | Element | UTF-8 | 410 | Data Type | | 411 +------------+------------------------------------------------------+ 412 | Endianness | None | 413 | Length | A UTF-8 Element may declare any length from zero to | 414 | | "VINTMAX". | 415 | Definition | A UTF-8 Element shall contain only a valid Unicode | 416 | | string as defined in | 417 | | [RFC2279](). | 418 | | Octets with all bits set to zero may follow the | 419 | | UTF-8 value when needed. | 420 +------------+------------------------------------------------------+ 422 +------------+------------------------------------------------------+ 423 | Element | Date | 424 | Data Type | | 425 +------------+------------------------------------------------------+ 426 | Endianness | None | 427 | Length | A Date Element MUST declare a length of either 0 | 428 | | octets or 8 octets. A Date Element with a zero-octet | 429 | | length represents a timestamp of | 430 | | 2001-01-01T00:00:00.000000000 UTC. | 431 | Definition | The Date Element MUST contain a Signed Integer that | 432 | | expresses a point in time referenced in nanoseconds | 433 | | from the precise beginning of the third millennium | 434 | | of the Gregorian Calendar in Coordinated Universal | 435 | | Time (also known as 2001-01-01T00:00:00.000000000 | 436 | | UTC). This provides a possible expression of time | 437 | | from 1708-09-11T00:12:44.854775808 UTC to | 438 | | 2293-04-11T11:47:16.854775807 UTC. | 439 +------------+------------------------------------------------------+ 440 +------------+------------------------------------------------------+ 441 | Element | Master-element | 442 | Data Type | | 443 +------------+------------------------------------------------------+ 444 | Endianness | None | 445 | Length | A Master-element may declare any length from zero to | 446 | | "VINTMAX". The Master-element may also use an | 447 | | unknown length. See the section on Element Data Size | 448 | | for rules that apply to elements of unknown length. | 449 | Definition | The Master-element contains zero, one, or many other | 450 | | elements. Elements contained within a Master-element | 451 | | must be defined for use at levels greater than the | 452 | | level of the Master-element. For instance is a | 453 | | Master-element occurs on level 2 then all contained | 454 | | Elements must be valid at level 3. Element Data | 455 | | stored within Master-elements SHOULD only consist of | 456 | | EBML Elements and SHOULD NOT contain any data that | 457 | | is not part of an EBML Element. When EBML is used in | 458 | | transmission or streaming, data that is not part of | 459 | | an EBML Element is permitted to be present within a | 460 | | Master-element if "unknownsizeallowed" is enabled | 461 | | within that Master-element's definition. In this | 462 | | case, the reader should skip data until a valid | 463 | | Element ID of the same level or the next greater | 464 | | level of the Master-element is found. What Element | 465 | | IDs are considered valid within a Master-element is | 466 | | identified by the EBML Schema for that version of | 467 | | the EBML Document Type. Any data contained with a | 468 | | Master-element that is not part of an Element SHOULD | 469 | | be ignored. | 470 +------------+------------------------------------------------------+ 472 +--------------+----------------------------------------------------+ 473 | Element Data | Binary | 474 | Type | | 475 +--------------+----------------------------------------------------+ 476 | Endianness | None | 477 | Length | A binary element may declare any length from zero | 478 | | to "VINTMAX". | 479 | Definition | The contents of a Binary element should not be | 480 | | interpreted by the EBML parser. | 481 +--------------+----------------------------------------------------+ 483 1.9. EBML Document 485 An EBML Document is comprised of only two components, an EBML Header 486 and an EBML Body. An EBML Document MUST start with an EBML Header 487 which declares significant characteristics of the entire EBML Body. 489 An EBML Document MAY only consist of EBML Elements and MUST NOT 490 contain any data that is not part of an EBML Element. The initial 491 EBML Element of an EBML Document and the Elements that follow it are 492 considered Level 0 Elements. If an EBML Master-element is considered 493 to be at level N and it contains one or many other EBML Elements then 494 the contained Elements shall be considered at Level N+1. Thus a 495 Level 2 Element would have to be contained by a Master-element (at 496 Level 1) that is contained by another Master-element (at Level 0). 498 1.9.1. EBML Header 500 The EBML Header is a declaration that provides processing 501 instructions and identification of the EBML Body. The EBML Header 502 may be considered as analogous to an XML Declaration. All EBML 503 Documents MUST begin with a valid EBML Header. 505 The EBML Header documents the EBML Schema (also known as the EBML 506 DocType) that may be used to semantically interpret the structure and 507 meaning of the EBML Document. Additionally the EBML Header documents 508 the versions of both EBML and the EBML Schema that were used to write 509 the EBML Document and the versions required to read the EBML 510 Document. 512 The EBML Header consists of a single Master-element with an Element 513 ID of 'EBML'. The EBML Header MUST ONLY contain EBML Elements that 514 are defined as part of the EBML Specification. 516 All EBML Elements within the EBML Header MUST NOT utilize any Element 517 ID with a length greater than 4 octets. All EBML Elements within the 518 EBML Header MUST NOT utilize any Element Data Size with a length 519 greater than 4 octets. 521 1.9.2. EBML Body 523 All data of an EBML Document following the EBML Header may be 524 considered the EBML Body. The end of the EBML Body, as well as the 525 end of the EBML Document that contains the EBML Body, is considered 526 as whichever comes first: the beginning of a new level 0 EBML Header 527 or the end of the file. The EBML Body MAY only consist of EBML 528 Elements and MUST NOT contain any data that is not part of an EBML 529 Element. Although the EBML specification itself defines precisely 530 what EBML Elements are to be used within the EBML Header, the EBML 531 specification does not name or define what EBML Elements are to be 532 used within the EBML Body. The definition of what EBML Elements are 533 to be used within the EBML Body is defined by an EBML Schema. 535 1.10. EBML Stream 537 An EBML Stream is a file that consists of one or many EBML Documents 538 that are concatenated together. An occurrence of a Level 0 EBML 539 Header marks the beginning of an EBML Document. 541 1.11. Elements semantic 543 1.11.1. EBML Schema 545 An EBML Schema is an XML Document that defines the properties, 546 arrangement, and usage of EBML Elements that compose a specific EBML 547 Document Type. The relationship of an EBML Schema to an EBML 548 Document may be considered analogous to the relationship of an XML 549 Schema [1] to an XML Document [2]. An EBML Schema MUST be clearly 550 associated with one or many EBML Document Types. An EBML Schema must 551 be expressed as well-formed XML. An EBML Document Type is identified 552 by a unique string stored within the EBML Header element called 553 DocType; for example "matroska" or "webm". 555 As an XML Document, the EBML Schema MUST use "" as the 556 top level element. The "" element MAY contain 557 "" sub-elements. Each "" defines one EBML Element 558 through the use of several attributes which are defined in the 559 section on Section 1.11.1.1. EBML Schemas MAY contain additional 560 attributes to extend the semantics but MUST NOT conflict is the 561 definitions of the "" attributes defined within this 562 specification. 564 Within the EBML Schema each EBML Element is defined to occur at a 565 specific level. For any specificied EBML Element that is not at 566 level 0, the Parent EBML Element refers to the EBML Master-element 567 that that EBML Element is contained within. For any specifiied EBML 568 Master-element the Child EBML Element refers to the EBML Elements 569 that may be immediately contained within that Master-element. For 570 any EBML Element that is not defined at level 0, the Parent EBML 571 Element may be identified by the preceding "" node which has 572 a lower value as the defined "level" attribute. The only exception 573 for this rule are Global EBML Elements which may occur within any 574 Parent EBML Element within the restriction of the Global EBML 575 Element's range declaration. 577 An EBML Schema MUST declare exactly one Element at Level 0 (referred 578 to as the Root Element) that MUST occur exactly once within an EBML 579 Document. The Root Element MUST be mandatory (with minOccurs set to 580 1) and MUST be defined to occur exactly once (maxOccurs set to 1). 581 Note that the EBML and Void Elements may also occur at Level 0 but 582 are not considered to be Root Elements. 584 Elements defined to only occur at Level 1 are known as Top-Level 585 Elements. 587 The EBML Schema does not itself document the EBML Header, but 588 documents all data of the EBML Document that follows the EBML Header. 589 The EBML Header itself is documented by this specification in the 590 Section 1.11.2 section. The EBML Schema also does not document 591 Global Elements that are defined by the EBML Specification (namely 592 Void and CRC-32). 594 1.11.1.1. EBML Schema Element Attributes 596 Within an EBML Schema the "" uses the following 597 attributes to define the EBML Schema: 599 +-----------+----------+--------------------------------------------+ 600 | attribute | required | definition | 601 | name | | | 602 +-----------+----------+--------------------------------------------+ 603 | docType | Yes | The "docType" lists the official name of | 604 | | | the EBML Document Type that is defined by | 605 | | | the EBML Schema; for example, "". | 607 | version | Yes | The "version" lists an incremental non- | 608 | | | negative integer that specifies the | 609 | | | version of the docType documented by the | 610 | | | EBML Schema. Unlike XML Schemas, an EBML | 611 | | | Schema documents all versions of a | 612 | | | docType's definition rather than using | 613 | | | separate EBML Schemas for each version of | 614 | | | a docType. Elements may be introduced and | 615 | | | deprecated by using the "minver" and | 616 | | | "maxver" attributes of . | 617 +-----------+----------+--------------------------------------------+ 619 Within an EBML Schema the "" uses the following attributes 620 to define an EBML Element. 622 +--------------------+----------+-----------------------------------+ 623 | attribute name | required | definition | 624 +--------------------+----------+-----------------------------------+ 625 | name | Yes | The official human-readable name | 626 | | | of the EBML Element. The value of | 627 | | | the name MUST be in the form of | 628 | | | an NCName as defined by the XML | 629 | | | Schema specification [3]. | 630 | level | Yes | The level notes at what | 631 | | | hierarchical depth the EBML | 632 | | | Element may occur within an EBML | 633 | | | Document. The Root Element of an | 634 | | | EBML Document is at level 0 and | 635 | | | the Elements that it may contain | 636 | | | are at level 1. The level MUST be | 637 | | | expressed as an integer. Note | 638 | | | that Elements defined as "global" | 639 | | | and "recursive" MAY occur at a | 640 | | | level greater than or equal to | 641 | | | the defined "level". | 642 | global | No | A boolean to express if an EBML | 643 | | | Element MUST occur at its defined | 644 | | | level or may occur within any | 645 | | | Parent EBML Element. If the | 646 | | | "global" attribute is not | 647 | | | expressed for that Element then | 648 | | | that element is to be considered | 649 | | | not global. | 650 | id | Yes | The Element ID expressed in | 651 | | | hexadecimal notation prefixed by | 652 | | | a "0x". To reduce the risk of | 653 | | | false positives while parsing | 654 | | | EBML Streams, the IDs of the Root | 655 | | | Element and Top-Level Elements | 656 | | | SHOULD be at least 4 octets in | 657 | | | length. Element IDs defined for | 658 | | | use at Level 0 or Level 1 MAY use | 659 | | | shorter octet lengths to | 660 | | | facilitate padding and optimize | 661 | | | edits to EBML Documents; for | 662 | | | instance, the EBML Void Element | 663 | | | uses an Element ID with a one | 664 | | | octet length to allow its usage | 665 | | | in more writing and editing | 666 | | | scenarios. | 667 | minOccurs | No | An integer to express the minimal | 668 | | | number of occurrences that the | 669 | | | EBML Element MUST occur within | 670 | | | its Parent Element if its Parent | 671 | | | Element is used. If the Element | 672 | | | has no Parent Level (as is the | 673 | | | case with Elements at Level 0), | 674 | | | then minOccurs refers to | 675 | | | constaints on the Element's | 676 | | | occurrence within the EBML | 677 | | | Document. If the minOccurs | 678 | | | attribute is not expressed for | 679 | | | that Element then that Element | 680 | | | shall be considered to have a | 681 | | | minOccurs value of 0. This value | 682 | | | of minOccurs MUST be a positive | 683 | | | integer. The semantic meaning of | 684 | | | minOccurs within an EBML Schema | 685 | | | is considered analogous to the | 686 | | | meaning of minOccurs within an | 687 | | | XML Schema [4]. Note that | 688 | | | Elements with minOccurs set to | 689 | | | "1" that also have a default | 690 | | | value declared are not required | 691 | | | to be stored but are required to | 692 | | | be interpretted, see the Section | 693 | | | 1.11.1.6. | 694 | maxOccurs | No | A value to express the maximum | 695 | | | number of occurrences that the | 696 | | | EBML Element MAY occur within its | 697 | | | Parent Element if its Parent | 698 | | | Element is used. If the Element | 699 | | | has no Parent Level (as is the | 700 | | | case with Elements at Level 0), | 701 | | | then maxOccurs refers to | 702 | | | constaints on the Element's | 703 | | | occurrence within the EBML | 704 | | | Document. This value may be | 705 | | | either a positive integer or the | 706 | | | term "unbounded" to indicate | 707 | | | there is no maximum number of | 708 | | | occurrences or the term | 709 | | | "identical" to indicate that the | 710 | | | Element is an Section 1.11.1.3. | 711 | | | If the maxOccurs attribute is not | 712 | | | expressed for that Element then | 713 | | | that Element shall be considered | 714 | | | to have a maxOccurs value of 1. | 715 | | | The semantic meaning of maxOccurs | 716 | | | within an EBML Schema is | 717 | | | considered analogous to the | 718 | | | meaning of minOccurs within an | 719 | | | XML Schema [5], with EBML Schema | 720 | | | adding the concept of Identically | 721 | | | Recurring Elements. | 722 | range | No | For Elements which are of | 723 | | | numerical types (Unsigned | 724 | | | Integer, Signed Integer, Float, | 725 | | | and Date) a numerical range may | 726 | | | be specified. If specified that | 727 | | | the value of the EBML Element | 728 | | | MUST be within the defined range | 729 | | | inclusively. See the Section | 730 | | | 1.11.1.4 for rules applied to | 731 | | | expression of range values. | 732 | default | No | A default value may be provided. | 733 | | | If an Element is mandatory but | 734 | | | not written within its Parent | 735 | | | EBML Element, then the parser of | 736 | | | the EBML Document MUST insert the | 737 | | | defined default value of the | 738 | | | Element. EBML Elements that are | 739 | | | Master-elements MUST NOT declare | 740 | | | a default value. | 741 | type | Yes | As defined within the Section | 742 | | | 1.8, the type MUST be set to one | 743 | | | of the following values: | 744 | | | 'integer' (signed integer), | 745 | | | 'uinteger' (unsigned integer), | 746 | | | 'float', 'string', 'date', | 747 | | | 'utf-8', 'master', or 'binary'. | 748 | unknownsizeallowed | No | A boolean to express if an EBML | 749 | | | Element MAY be used as an | 750 | | | "Unknown-Sized Element" (having | 751 | | | all VINT_DATA bits of Element | 752 | | | Data Size set to 1). The | 753 | | | "unknownsizeallowed" attribute | 754 | | | only applies to Master-elements. | 755 | | | If the "unknownsizeallowed" | 756 | | | attribute is not used it is | 757 | | | assumed that the element is not | 758 | | | allowed to use an unknown Element | 759 | | | Data Size. | 760 | recursive | No | A boolean to express if an EBML | 761 | | | Element MAY be stored | 762 | | | recursively. In this case the | 763 | | | Element MAY be stored at levels | 764 | | | greater that defined in the | 765 | | | "level" attribute if the Element | 766 | | | is a Child Element of a Parent | 767 | | | Element with the same Element ID. | 768 | | | The "recursive" attribute only | 769 | | | applies to Master-elements. If | 770 | | | the "recursive" attribute is not | 771 | | | used it is assumed that the | 772 | | | element is not allowed to be used | 773 | | | recursively. | 774 | minver | No | The "minver" (minimum version) | 775 | | | attribute stores a non-negative | 776 | | | integer that represents the first | 777 | | | version of the docType to support | 778 | | | the element. If the "minver" | 779 | | | attribute is not used it is | 780 | | | assumed that the element has a | 781 | | | minimum version of "1". | 782 | maxver | No | The "maxver" (maximum version) | 783 | | | attribute stores a non-negative | 784 | | | integer that represents the last | 785 | | | or most recent version of the | 786 | | | docType to support the element. | 787 | | | If the "maxver" attribute is not | 788 | | | used it is assumed that the | 789 | | | element has a maximum version | 790 | | | equal to the value stored in the | 791 | | | "version" attribute of . | 792 +--------------------+----------+-----------------------------------+ 794 The "" nodes shall contain a description of the meaning and 795 use of the EBML Element stored within one or many "" 796 sub-elements. The "" sub-element may use a "lang" 797 attribute which may be set to the RFC 5646 value of the language of 798 the element's documentation. The "" sub-element may 799 use a "type" attribute to distinguish the meaning of the 800 documentation. Recommended values for the "" sub- 801 element's "type" attribute include: "definition", "rationale", "usage 802 notes", and "references". 804 The "" nodes MUST be arranged hierarchically according to 805 the permitted structure of the EBML Document Type. An "" 806 node that defines an EBML Element which is a Child Element of another 807 Parent Element MUST be stored as an immediate sub-element of the 808 "" node that defines the Parent Element. "" nodes 809 that define Level 0 Elements and Global Elements should be sub- 810 elements of "". 812 1.11.1.2. EBML Schema Example 813 814 815 816 817 Container of data and 818 attributes representing one or many files. 819 821 An attached file. 822 823 825 Filename of the attached 826 file. 827 828 830 MIME type of the 831 file. 832 833 835 Modification timestamp of 836 the file. 837 838 840 The data of the 841 file. 842 843 844 845 847 1.11.1.3. Identically Recurring Elements 849 An Identically Recurring Element is an Element that may occur within 850 its Parent Element more than once but that each recurrence within 851 that Parent Element MUST be identical both in storage and semantics. 852 Identically Recurring Elements are permitted to be stored multiple 853 times within the same Parent Element in order to increase data 854 resilience and optimize the use of EBML in transmission. Identically 855 Recurring Elements SHOULD include a CRC-32 Element as a Child 856 Element; this is especially recommended when EBML is used for long- 857 term storage or transmission. If a Parent Element contains more than 858 one copy of an Identically Recurring Element which includes a CRC-32 859 Child Element then the first instance of the Identically Recurring 860 Element with a valid CRC-32 value should be used for interpretation. 862 If a Parent Element contains more than one copy of an Identically 863 Recurring Element which does not contain a CRC-32 Child Element or if 864 CRC-32 Child Elements are present but none are valid then the first 865 instance of the Identically Recurring Element should be used for 866 interpretation. 868 1.11.1.4. Expression of range 870 The "range" attribute MUST only be used with EBML Elements that are 871 either "signed integer", "unsigned integer", or "float". The "range" 872 attribute does not support date EBML Elements. The "range" 873 expression may contain whitespace for readability but whitespace 874 within a "range" expression MUST NOT convey meaning. The expression 875 of the "range" MUST adhere to one of the following forms: 877 o "x-y" where x and y are integers or floats and "y" must be greater 878 than "x", meaning that the value must be greater than or equal to 879 "x" and less than or equal to "y". 881 o ">x" where "x" is an integer or float, meaning that the value MUST 882 be greater than "x". 884 o "x" where "x" is an integer or float, meaning that the value MUST 885 be equal "x". 887 The "range" may use the prefix "not" to indicate that the expressed 888 range is negated. Please also see the section on Section 1.11.1.5. 890 1.11.1.5. Textual expression of Floats 892 When a float value is represented textually in an EBML Schema, such 893 as within a "default" or "range" value, the float values MUST be 894 expressed as a Hexadecimal Floating-Point Constants as defined in the 895 C11 standard ISO/IEC 9899:2011 [6] (see section 6.4.4.2 on Floating 896 Constants). The following table provides examples of expressions of 897 float ranges. 899 +-------------------+-----------------------------------------+ 900 | as decimal | as Hexadecimal Floating-Point Constants | 901 +-------------------+-----------------------------------------+ 902 | 0.0-1.0 | "0x0p+1-0x1p+0" | 903 | 1.0-256.0 | "0x1p+0-0x1p+8" | 904 | 0.857421875 | "0x1.b7p-1" | 905 | -1.0--0.857421875 | "-0x1p+0--0x1.b7p-1" | 906 +-------------------+-----------------------------------------+ 908 Within an expression of a float range, as in an integer range, the 909 "-" (hyphen) character is the separator between the minimal and 910 maximum value permitted by the range. Note that Hexadecimal 911 Floating-Point Constants also use a "-" (hyphen) when indicating a 912 negative binary power. Within a float range, when a "-" (hyphen) is 913 immediately preceded by a letter "p", then the "-" (hyphen) is a part 914 of the Hexadecimal Floating-Point Constant which notes negative 915 binary power. Within a float range, when a "-" (hyphen) is not 916 immediately preceded by a letter "p", then the "-" (hyphen) 917 represents the separator between the minimal and maximum value 918 permitted by the range. 920 1.11.1.6. Note on the Use of default attributes to define Mandatory 921 EBML Elements 923 If a Mandatory EBML Element has a default value declared by an EBML 924 Schema and the EBML Element's value is equal to the declared default 925 value then that Element is not required to be present within the EBML 926 Document if its Parent EBML Element is present. In this case, the 927 default value of the Mandatory EBML Element may be assumed although 928 the EBML Element is not present within its Parent EBML Element. Also 929 in this case the parser of the EBML Document MUST insert the defined 930 default value of the Element. 932 If a Mandatory EBML Element has no default value declared by an EBML 933 Schema and its Parent EBML Element is present than the EBML Element 934 must be present as well. If a Mandatory EBML Element has a default 935 value declared by an EBML Schema and its Parent EBML Element is 936 present and the EBML Element's value is NOT equal to the declared 937 default value then the EBML Element MUST be used. 939 This table clarifies if a Mandatory EBML Element MUST be written, 940 according to if the default value is declared, if the value of the 941 EBML Element is equal to the declared default value, and if the 942 Parent EBML Element is used. 944 +---------------+----------------+--------------+-------------------+ 945 | Is the | Is the value | Is the | Then is storing | 946 | default value | equal to | Parent | the EBML Element | 947 | declared? | default? | Element | required? | 948 | | | used? | | 949 +---------------+----------------+--------------+-------------------+ 950 | Yes | Yes | Yes | No | 951 | Yes | Yes | No | No | 952 | Yes | No | Yes | Yes | 953 | Yes | No | No | No | 954 | No | n/a | Yes | Yes | 955 | No | n/a | No | No | 956 | No | n/a | Yes | Yes | 957 | No | n/a | No | No | 958 +---------------+----------------+--------------+-------------------+ 960 1.11.1.7. Note on the Use of default attributes to define non-Mandatory 961 EBML Elements 963 If an EBML Element is not Mandatory, has a defined default value, and 964 is an Empty EBML Element then the EBML Element MUST be interpreted as 965 expressing the default value. 967 1.11.2. EBML Header Elements 969 This specification here contains definitions of all EBML Elements of 970 the EBML Header. 972 +-------------+-----------------------------------------------------+ 973 | Name | EBML | 974 +-------------+-----------------------------------------------------+ 975 | Level | 0 | 976 | EBML ID | "0x1A45DFA3" | 977 | Mandatory | Yes | 978 | Multiple | No | 979 | Range | - | 980 | Default | - | 981 | Type | Master-element | 982 | Description | Set the EBML characteristics of the data to follow. | 983 | | Each EBML Document has to start with this. | 984 +-------------+-----------------------------------------------------+ 985 +-------------+-----------------------------------------------------+ 986 | Name | EBMLVersion | 987 +-------------+-----------------------------------------------------+ 988 | Level | 1 | 989 | EBML ID | "0x4286" | 990 | Mandatory | Yes | 991 | Multiple | No | 992 | Range | 1 | 993 | Default | 1 | 994 | Type | Unsigned Integer | 995 | Description | The version of EBML parser used to create the EBML | 996 | | Document. | 997 +-------------+-----------------------------------------------------+ 999 +-------------+-----------------------------------------------------+ 1000 | Name | EBMLReadVersion | 1001 +-------------+-----------------------------------------------------+ 1002 | Level | 1 | 1003 | EBML ID | "0x42F7" | 1004 | Mandatory | Yes | 1005 | Multiple | No | 1006 | Range | 1 | 1007 | Default | 1 | 1008 | Type | Unsigned Integer | 1009 | Description | The minimum EBML version a parser has to support to | 1010 | | read this EBML Document. | 1011 +-------------+-----------------------------------------------------+ 1013 +-------------+-----------------------------------------------------+ 1014 | Name | EBMLMaxIDLength | 1015 +-------------+-----------------------------------------------------+ 1016 | Level | 1 | 1017 | EBML ID | "0x42F2" | 1018 | Mandatory | Yes | 1019 | Multiple | No | 1020 | Range | >3 | 1021 | Default | 4 | 1022 | Type | Unsigned Integer | 1023 | Description | The EBMLMaxIDLength is the maximum length in octets | 1024 | | of the Element IDs to be found within the EBML | 1025 | | Body. An EBMLMaxIDLength value of four is | 1026 | | recommended, though larger values are allowed. | 1027 +-------------+-----------------------------------------------------+ 1028 +-------------+-----------------------------------------------------+ 1029 | Name | EBMLMaxSizeLength | 1030 +-------------+-----------------------------------------------------+ 1031 | Level | 1 | 1032 | EBML ID | "0x42F3" | 1033 | Mandatory | Yes | 1034 | Multiple | No | 1035 | Range | >0 | 1036 | Default | 8 | 1037 | Type | Unsigned Integer | 1038 | Description | The EBMLMaxSizeLength is the maximum length in | 1039 | | octets of the expression of all Element Data Sizes | 1040 | | to be found within the EBML Body. To be clear | 1041 | | EBMLMaxSizeLength documents the maximum 'length' of | 1042 | | all Element Data Size expressions within the EBML | 1043 | | Body and not the maximum 'value' of all Element | 1044 | | Data Size expressions within the EBML Body. | 1045 | | Elements that have a Element Data Size expression | 1046 | | which is larger in octets than what is expressed by | 1047 | | EBMLMaxSizeLength SHALL be considered invalid. | 1048 +-------------+-----------------------------------------------------+ 1050 +-------------+-----------------------------------------------------+ 1051 | Name | DocType | 1052 +-------------+-----------------------------------------------------+ 1053 | Level | 1 | 1054 | EBML ID | "0x4282" | 1055 | Mandatory | Yes | 1056 | Multiple | No | 1057 | Range | - | 1058 | Default | matroska | 1059 | Type | String | 1060 | Description | A string that describes and identifies the content | 1061 | | of the EBML Body that follows this EBML Header. | 1062 +-------------+-----------------------------------------------------+ 1063 +-------------+-----------------------------------------------------+ 1064 | Name | DocTypeVersion | 1065 +-------------+-----------------------------------------------------+ 1066 | Level | 1 | 1067 | EBML ID | "0x4287" | 1068 | Mandatory | Yes | 1069 | Multiple | No | 1070 | Range | - | 1071 | Default | 1 | 1072 | Type | Unsigned Integer | 1073 | Description | The version of DocType interpreter used to create | 1074 | | the EBML Document. | 1075 +-------------+-----------------------------------------------------+ 1077 +-------------+-----------------------------------------------------+ 1078 | Name | DocTypeReadVersion | 1079 +-------------+-----------------------------------------------------+ 1080 | Level | 1 | 1081 | EBML ID | "0x4285" | 1082 | Mandatory | Yes | 1083 | Multiple | No | 1084 | Range | - | 1085 | Default | 1 | 1086 | Type | Unsigned Integer | 1087 | Description | The minimum DocType version an interpreter has to | 1088 | | support to read this EBML Document. | 1089 +-------------+-----------------------------------------------------+ 1091 1.11.3. Global elements (used everywhere in the format) 1092 +-------------+-----------------------------------------------------+ 1093 | Name | CRC-32 | 1094 +-------------+-----------------------------------------------------+ 1095 | Level | 1+ | 1096 | Global | Yes | 1097 | EBML ID | "0xBF" | 1098 | Mandatory | No | 1099 | Range | - | 1100 | Default | - | 1101 | Type | Binary | 1102 | Description | The CRC-32 Element contains a 32 bit Cyclic | 1103 | | Redundancy Check value of all the Element Data of | 1104 | | the Parent Element as stored except for the CRC-32 | 1105 | | Element itself. When the CRC-32 Element is present, | 1106 | | the CRC-32 Element MUST be the first ordered | 1107 | | Element within its Parent Element for easier | 1108 | | reading. All Top-Level Elements of an EBML Document | 1109 | | SHOULD include a CRC-32 Element as a Child Element. | 1110 | | The CRC in use is the IEEE-CRC-32 algorithm as used | 1111 | | in the ISO 3309 standard and in section 8.1.1.6.2 | 1112 | | of ITU-T recommendation V.42, with initial value of | 1113 | | "0xFFFFFFFF". The CRC value MUST be computed on a | 1114 | | little endian bitstream and MUST use little endian | 1115 | | storage. | 1116 +-------------+-----------------------------------------------------+ 1118 +-------------+-----------------------------------------------------+ 1119 | Name | Void | 1120 +-------------+-----------------------------------------------------+ 1121 | Level | 0+ | 1122 | Global | Yes | 1123 | EBML ID | "0xEC" | 1124 | Mandatory | No | 1125 | Multiple | Yes | 1126 | Range | - | 1127 | Default | - | 1128 | Type | Binary | 1129 | Description | Used to void damaged data, to avoid unexpected | 1130 | | behaviors when using damaged data. The content is | 1131 | | discarded. Also used to reserve space in a sub- | 1132 | | element for later use. | 1133 +-------------+-----------------------------------------------------+ 1135 2. References 1136 2.1. Normative References 1138 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1139 Requirement Levels", BCP 14, RFC 2119, 1140 DOI 10.17487/RFC2119, March 1997, 1141 . 1143 2.2. Informative References 1145 [RFC2279] Yergeau, F., "UTF-8, a transformation format of ISO 1146 10646", RFC 2279, DOI 10.17487/RFC2279, January 1998, 1147 . 1149 2.3. URIs 1151 [1] http://www.w3.org/XML/Schema#dev 1153 [2] http://www.w3.org/TR/xml/ 1155 [3] http://www.w3.org/TR/1999/REC-xml-names-19990114/#ns-decl 1157 [4] https://www.w3.org/TR/xmlschema-0/#ref6 1159 [5] https://www.w3.org/TR/xmlschema-0/#ref6 1161 [6] http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf 1163 Authors' Addresses 1165 Steve Lhomme 1167 Dave Rice