Re: Max value for VINT
Dave Rice <[email protected]> Mon, 5 Sep 2016 16:05:25 -0400
| Newsgroups | gmane.comp.multimedia.matroska.user |
|---|---|
| Message-ID | <[email protected]> |
--===============4055499355342375930== Content-Type: multipart/alternative; boundary="Apple-Mail=_DE3D113A-DCC5-42AE-BF2D-C34DADDA44BE" --Apple-Mail=_DE3D113A-DCC5-42AE-BF2D-C34DADDA44BE Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hi Iovu, I=E2=80=99m cc=E2=80=99ing the CELLAR mailing list since the topic is = relevant to current work there. > On Sep 5, 2016, at 3:46 PM, Ion Iovu <[email protected]> wrote: >=20 > Hi guys.=20 >=20 > I'd like to know what the maximum value for the VINT is. The RFC draft = <https://matroska.org/contact/index.html> page mention examples of VINT = values with up to a tail of 3 bytes, however no mention of any upper = limit for VINT is mentioned. The 2004 RFC draft <https://matroska.org/technical/specs/rfc/index.html> = on matroska.org is superseded by the current work of the IETF CELLAR = <https://datatracker.ietf.org/wg/cellar/> working group. The current RFC = for EBML is a work in progress at = https://github.com/Matroska-Org/ebml-specification/blob/master/specificati= on.markdown. > It can be inferred from the following text: >=20 > =E2=80=9CSince the highest value is used for unknown size the = effective maximum data size is 2^56-2, using variable size integer width = 8.=E2=80=9D >=20 > that particularly for element sizes you can only go to at most 8 bytes = (a tail of 7 bytes),=20 > 2^56-1 is a reserved one, and valid values are in the range 0..2^56-2 That=E2=80=99s right. The spec we=E2=80=99re working on includes a = clarification on this: "An Element Data Size with an octet length of 8 is able to express a = size of 2^56-2 or 72,057,594,037,927,934 octets (or about 72 petabytes). = The maximum possible value that can be stored as Element Data Size is = referred to as VINTMAX." > However, that does not mean the VINT as a data type is limited by that = value. Within the EBML Body the max length of the Element Data Size is declared = in the EBML Header in EBMLMaxSizeLength. For Matroska that is limited to = 8, which provides a VINTMAX of 72,057,594,037,927,934; however another = EBML format could permit the EBMLMaxSizeLength to be values higher than = 8, if you find the 72,057,594,037,927,934 bytes too constraining. > Is it possible to go with a VINT_ALIGNMENT of more than 8 bits? Hmm, the term VINT_ALIGNMENT is in the superseded 2004 RFC Draft = <https://matroska.org/technical/specs/rfc/index.html> but in the new RFC = work it is just referred to as zero-padding. VINT_ALIGNMENT of greater than 8 bits is not allowed in Element IDs = since they are required to use the shortest valid encoding, but an = Element Data Size may use more than 8 bits of zero-padding (aka = VINT_ALIGNMENT). For instance, both 0b10000001 and = 0b0000000100000000000000000000000000000000000000000000000000000001 (a = VINT_ALIGNMENT of 55 bits) are valid methods to express a VINT of = Element Data Size of 1. [=E2=80=A6] Best Regards, Dave Rice --Apple-Mail=_DE3D113A-DCC5-42AE-BF2D-C34DADDA44BE Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 <html><head><meta http-equiv=3D"Content-Type" content=3D"text/html = charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; = -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" = class=3D""><div class=3D"">Hi Iovu,</div><div class=3D""><br = class=3D""></div><div class=3D"">I=E2=80=99m cc=E2=80=99ing the CELLAR = mailing list since the topic is relevant to current work there.</div><br = class=3D""><div><blockquote type=3D"cite" class=3D""><div class=3D"">On = Sep 5, 2016, at 3:46 PM, Ion Iovu <<a href=3D"mailto:[email protected]" = class=3D"">[email protected]</a>> wrote:</div><br = class=3D"Apple-interchange-newline"><div class=3D""><meta = http-equiv=3D"Content-Type" content=3D"text/html charset=3Dutf-8" = class=3D""><div style=3D"word-wrap: break-word; -webkit-nbsp-mode: = space; -webkit-line-break: after-white-space;" class=3D"">Hi = guys. <div class=3D""><br class=3D""></div><div class=3D"">I'd like = to know what the maximum value for the VINT is. The <a = href=3D"https://matroska.org/contact/index.html" class=3D"">RFC = draft</a> page mention examples of VINT values with up to a tail of = 3 bytes, however no mention of any upper limit for VINT is = mentioned.</div></div></div></blockquote><div><br = class=3D""></div><div>The 2004 <a = href=3D"https://matroska.org/technical/specs/rfc/index.html" = class=3D"">RFC draft</a> on <a href=3D"http://matroska.org" = class=3D"">matroska.org</a> is superseded by the current work of the = IETF <a href=3D"https://datatracker.ietf.org/wg/cellar/" = class=3D"">CELLAR</a> working group. The current RFC for EBML is a = work in progress at <a = href=3D"https://github.com/Matroska-Org/ebml-specification/blob/master/spe= cification.markdown" = class=3D"">https://github.com/Matroska-Org/ebml-specification/blob/master/= specification.markdown</a>.</div><br class=3D""><blockquote type=3D"cite" = class=3D""><div class=3D""><div style=3D"word-wrap: break-word; = -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" = class=3D""><div class=3D""><div class=3D"">It can be inferred from the = following text:</div><blockquote style=3D"margin: 0 0 0 40px; border: = none; padding: 0px;" class=3D""><div class=3D""><br class=3D""></div><div = class=3D""><div class=3D"">=E2=80=9CSince the highest value is used for = unknown size the effective maximum data size is 2^56-2, using variable = size integer width 8.=E2=80=9D</div></div></blockquote><br class=3D""><div= class=3D"">that particularly for element sizes you can only go to at = most 8 bytes (a tail of 7 bytes), </div><div class=3D"">2^56-1 is a = reserved one, and valid values are in the range = 0..2^56-2</div></div></div></div></blockquote><div><br = class=3D""></div><div>That=E2=80=99s right. The spec we=E2=80=99re = working on includes a clarification on this:</div><div><br = class=3D""></div><div>"An Element Data Size with an octet length of 8 is = able to express a size of 2^56-2 or 72,057,594,037,927,934 octets = (or about 72 petabytes). The maximum possible value that can = be stored as Element Data Size is referred to = as VINTMAX."</div><br class=3D""><blockquote type=3D"cite" = class=3D""><div class=3D""><div style=3D"word-wrap: break-word; = -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" = class=3D""><div class=3D""><div class=3D"">However, that does not mean = the VINT as a data type is limited by that = value.</div></div></div></div></blockquote><div><br = class=3D""></div><div>Within the EBML Body the max length of the Element = Data Size is declared in the EBML Header in EBMLMaxSizeLength. For = Matroska that is limited to 8, which provides a VINTMAX of = 72,057,594,037,927,934; however another EBML format could permit the = EBMLMaxSizeLength to be values higher than 8, if you find the = 72,057,594,037,927,934 bytes too constraining.</div><br = class=3D""><blockquote type=3D"cite" class=3D""><div class=3D""><div = style=3D"word-wrap: break-word; -webkit-nbsp-mode: space; = -webkit-line-break: after-white-space;" class=3D""><div class=3D"">Is it = possible to go with a VINT_ALIGNMENT of more than 8 = bits?</div></div></div></blockquote><div><br class=3D""></div><div>Hmm, = the term VINT_ALIGNMENT is in the superseded <a = href=3D"https://matroska.org/technical/specs/rfc/index.html" = class=3D"">2004 RFC Draft</a> but in the new RFC work it is just = referred to as zero-padding.</div><div>VINT_ALIGNMENT of greater than 8 = bits is not allowed in Element IDs since they are required to use the = shortest valid encoding, but an Element Data Size may use more than 8 = bits of zero-padding (aka VINT_ALIGNMENT).</div><div><br = class=3D""></div><div>For instance, both 0b10000001 and = 0b0000000100000000000000000000000000000000000000000000000000000001 (a = VINT_ALIGNMENT of 55 bits) are valid methods to express a VINT of = Element Data Size of 1.</div><div><br = class=3D""></div><div>[=E2=80=A6]</div><div><br class=3D""></div><div>Best= Regards,</div><div>Dave Rice</div><div><br = class=3D""></div></div></body></html>= --Apple-Mail=_DE3D113A-DCC5-42AE-BF2D-C34DADDA44BE-- --===============4055499355342375930== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Matroska-users mailing list [email protected] https://lists.matroska.org/cgi-bin/mailman/listinfo/matroska-users Read Matroska-Users on GMane: http://dir.gmane.org/gmane.comp.multimedia.matroska.user --===============4055499355342375930==--