To encode the data size Matroska uses a flexible length encoding. These are basically unsigned ints with a length from 1 to 8 bytes or from 7 to 56 bits. See the spec for more information: https://www.matroska.org/technical/specs/index.html#EBML_ex
These seem to have two issues in node-ebml currently:
The first group should not be our main concern, I have not seen that yet and we may be able to just throw an error if that happens. We should check for the "all 1"-special case thou.
The second group is going to be a problem. We might need something like bigint or bignum for that, but we can not use bignum as a buffer size etc. I guess we need some real-world samples to figure out what could be done here.
Issues related to this are #8 and #10.
To encode the data size Matroska uses a flexible length encoding. These are basically unsigned ints with a length from 1 to 8 bytes or from 7 to 56 bits. See the spec for more information: https://www.matroska.org/technical/specs/index.html#EBML_ex
These seem to have two issues in node-ebml currently:
The first group should not be our main concern, I have not seen that yet and we may be able to just throw an error if that happens. We should check for the "all 1"-special case thou.
The second group is going to be a problem. We might need something like bigint or bignum for that, but we can not use bignum as a buffer size etc. I guess we need some real-world samples to figure out what could be done here.
Issues related to this are #8 and #10.