Skip to content

Can't read long bit length #5

@nickboucher

Description

@nickboucher

Just as in Issue #4, JS 32-bit limitations for bitwise operations prevent reading bit lengths greater than 31 bits because of the following section of .readbits():

    while (size < n) {
      byte = this._nextbyte();
      if (byte == null) {
        break;
      }
      size += 8;
      // This is the problematic line, since the bitshift value accumulates within the `while` loop
      bits = bits << 8 | byte;
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions