[Matroska-general] [Matroska-devel] Why after 1A 45 DF A3 EBML header code I have 93...

Moritz Bunkus moritz at bunkus.org
Wed Mar 6 12:59:57 CET 2013


Hey,

On Wed, Mar 6, 2013 at 10:21 AM, Peter Ivanov <qwerty123_1996 at abv.bg> wrote:

> What this code 93 means. After 42 82 DocType code there is 88 befor the
> identificator "matroska".

Every EBML element consists of three parts:

1. its ID
2. its content length
3. its content

You've already identified the EBML ID correctly (0x42 82). Therefore
the next byte(s) contain the content length encoded as an unsigned
EBML integer. Therefore the first byte, 0x88, indicates that the
length is encoded in a single byte and that the content length itself
is 8.

Therefore you read the following 8 bytes as the content, and that's
exactly the string "matroska".

See section 2.1 "Variable size integer" in
http://www.matroska.org/technical/specs/rfc/index.html for information
how to read variable-size EBML integer values. As a matter of fact, I
suggest you read the whole section 2 of that document.

Kind regards,
mosu


More information about the Matroska-general mailing list