Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bufrw

Package Overview
Dependencies
Maintainers
5
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bufrw - npm Package Compare versions

Comparing version 0.9.23 to 0.9.24

.idea/.name

2

package.json
{
"name": "bufrw",
"version": "0.9.23",
"version": "0.9.24",
"description": "Buffer Reading and Writing",

@@ -5,0 +5,0 @@ "keywords": [],

@@ -106,2 +106,3 @@ // Copyright (c) 2015 Uber Technologies, Inc.

['', [0x00]],
['/', [0x01, 0x2f]],
['abc', [0x03, 0x61, 0x62, 0x63]],

@@ -108,0 +109,0 @@ [bigTestStr, bigTestBytes],

@@ -42,5 +42,4 @@ // Copyright (c) 2015 Uber Technologies, Inc.

if (n === 0) LengthResult.just(1);
var nbits = 1;
if (n > 0) nbits = Math.log(n) / Math.log(2);
var needed = Math.ceil(nbits / 7);
var needed = Math.ceil(countBits(n) / 7);
return LengthResult.just(needed);

@@ -55,5 +54,3 @@ }

var nbits = 1;
if (n > 0) nbits = Math.log(n) / Math.log(2);
var needed = Math.ceil(nbits / 7);
var needed = Math.ceil(countBits(n) / 7);
var start = offset;

@@ -73,3 +70,4 @@ var end = offset + needed;

buffer.writeUInt8(b, --offset, true);
} while (n > 0);
if (n <= 0) break;
}

@@ -93,1 +91,7 @@ return WriteResult.just(end);

}
function countBits(n) {
var res = 1;
while (n >>= 1) res++;
return res;
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc