Skip to content

Problems with big chunks #34

Description

@themasch

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:

  • Integers with more than eight bytes, or bigger than 2^56-2. These shouldn't exist in ebml, following the spec.
  • Integers bigger than 2^53-1 but smaller than 2^56: Supported by EBML but not by JavaScript

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions