[Matroska-devel] EBML specification component for review - Element Data Size

Jerome Martinez jerome at mediaarea.net
Fri May 1 17:07:45 CEST 2015

Le 01/05/2015 16:55, wm4 a écrit :
> Here I'd ask what the exact value of "unknown size" is. Sure, all bits 
> are 1, but how many 1 bits are needed? It's a variable-length 
> encoding. For example, the byte 0xFF has all bits set. Does this mean 
> the length is unknown? (I think it is in EBML, not quite sure right now.) 

the ebml spec is not clear, but I understand from index.html (the 
matroska spec), thanks to "-2" everywhere, that:
1111 1111
0111 1111 1111 1111
0011 1111 1111 1111 1111 1111
0001 1111 1111 1111 1111 1111 1111 1111

are all reserved for an unknown size.
It makes sense because we can choose the size of "Data size" (and chose 
8 bytes if we have no idea of the size of the block at the end of the 
but "an Element Size encoded to all 1's" in the spec is not clear and 
should be reworded.
I propose "Any data sizes composed entirely of 1's after the first 1 
indicates that the size is unknown."

More information about the Matroska-devel mailing list