Skip to content

buffer: add read/write 64-bit integers to Buffer using BigInt

This PR adds methods to read and write signed and unsigned 64-bit integers to Buffers using BigInts. I have only added the basic methods before extending the functionality of existing methods such as readInt or readUInt. Another continuation of this PR could be a readUIntN(offset, bytes) for a BigInt method or extending the builtin methods (not sure of perf implications then).

If this PR is considered I can work more on the performance aspects, but I think this is a good start.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

Merge request reports

Loading