Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Converting negative numbers to Buffers #24

Open
yefremov opened this Issue · 0 comments

1 participant

@yefremov

This is more a question: is there any plans when conversion of ngeative numbers to buffers will be implemented?

As of now I'm doing this to convert negative numbers to Int64:

var buf1 = new Buffer(4);
var buf2 = new Buffer(4);

buf1.writeInt32BE(-1, 0);
buf2.writeInt32BE(-1, 0);

// <Buffer ff ff ff ff ff ff ff ff>
var buf3 = Buffer.concat([ buf1, buf2 ]); 

It would be very handy to utilize only bigint package to achieve the same result.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.