From 8432f1b94e6026b68443c36685d08c208c439fe2 Mon Sep 17 00:00:00 2001 From: Antoni Spaanderman <49868160+antonilol@users.noreply.github.com> Date: Tue, 11 Jan 2022 16:46:01 +0100 Subject: [PATCH 1/2] add bigint support https://github.com/villadora/node-buffer-reader/issues/1 --- index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/index.js b/index.js index dacc30b..af52ad0 100644 --- a/index.js +++ b/index.js @@ -92,6 +92,8 @@ MAKE_NEXT_READER_BOTH('UInt16', 2); MAKE_NEXT_READER_BOTH('Int16', 2); MAKE_NEXT_READER_BOTH('UInt32', 4); MAKE_NEXT_READER_BOTH('Int32', 4); +MAKE_NEXT_READER_BOTH('BigUInt64', 8); +MAKE_NEXT_READER_BOTH('BigInt64', 8); MAKE_NEXT_READER_BOTH('Float', 4); MAKE_NEXT_READER_BOTH('Double', 8); From f78c90167e276e3fbd13c8177072c79af45b38a8 Mon Sep 17 00:00:00 2001 From: Antoni Spaanderman <49868160+antonilol@users.noreply.github.com> Date: Tue, 11 Jan 2022 16:50:09 +0100 Subject: [PATCH 2/2] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9d13012..2ee838f 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,7 @@ Read a buffer with specified length ### nextString(length, [encoding]) Read next length of bytes as String, encoding default is 'utf8' -### next(Int8|UInt8)\[(Int16|UInt16|Int32|UInt32|Float|Double)(LE|BE)\]() +### next(Int8|UInt8)\[(Int16|UInt16|Int32|UInt32|BigInt64|BigUInt64|Float|Double)(LE|BE)\]() Read next bytes as given types, the value is just as the same format Buffer in nodejs doc. ## License