Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to read a single bit buffer in node

How to read a single bit buffer in node like -

<Buffer 00>

Usage - To read the Boolean value stored in SQL table

like image 938
Supreet Singh Avatar asked Jul 26 '26 23:07

Supreet Singh


1 Answers

You can access it by using Buffer API of nodejs

if we assume a is the variable having the above value, it can converted to int in node using following:

var value = a.readUIntLE()
like image 120
Dark Lord Avatar answered Jul 28 '26 14:07

Dark Lord