Socket
Socket
Sign inDemoInstall

uint8-varint

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

uint8-varint - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

dist/src/alloc.d.ts

7

dist/src/big.js
import accessor from 'byte-access';
import { LongBits } from 'longbits';
import { allocUnsafe } from './alloc.js';
const LIMIT = 0x7fn;

@@ -15,3 +16,3 @@ // https://github.com/joeltg/big-varint/blob/main/src/unsigned.ts

if (buf == null) {
buf = new Uint8Array(unsigned.encodingLength(value));
buf = allocUnsafe(unsigned.encodingLength(value));
}

@@ -39,3 +40,3 @@ const access = accessor(buf);

if (buf == null) {
buf = new Uint8Array(signed.encodingLength(value));
buf = allocUnsafe(signed.encodingLength(value));
}

@@ -58,3 +59,3 @@ if (value < 0n) {

if (buf == null) {
buf = new Uint8Array(zigzag.encodingLength(value));
buf = allocUnsafe(zigzag.encodingLength(value));
}

@@ -61,0 +62,0 @@ LongBits.fromBigInt(value).zzEncode().toBytes(buf, offset);

import { LongBits } from 'longbits';
import { allocUnsafe } from './alloc.js';
const N1 = Math.pow(2, 7);

@@ -47,3 +48,3 @@ const N2 = Math.pow(2, 14);

if (buf == null) {
buf = new Uint8Array(unsigned.encodingLength(value));
buf = allocUnsafe(unsigned.encodingLength(value));
}

@@ -66,3 +67,3 @@ LongBits.fromNumber(value).toBytes(buf, offset);

if (buf == null) {
buf = new Uint8Array(signed.encodingLength(value));
buf = allocUnsafe(signed.encodingLength(value));
}

@@ -69,0 +70,0 @@ if (value < 0) {

{
"name": "uint8-varint",
"version": "1.0.1",
"version": "1.0.2",
"description": "Read/write varints from Uint8Arrays and Uint8ArrayLists",

@@ -5,0 +5,0 @@ "license": "Apache-2.0 OR MIT",

import type { Uint8ArrayList } from 'uint8arraylist'
import accessor from 'byte-access'
import { LongBits } from 'longbits'
import { allocUnsafe } from './alloc.js'

@@ -19,3 +20,3 @@ const LIMIT = 0x7fn

if (buf == null) {
buf = new Uint8Array(unsigned.encodingLength(value))
buf = allocUnsafe(unsigned.encodingLength(value))
}

@@ -51,3 +52,3 @@

if (buf == null) {
buf = new Uint8Array(signed.encodingLength(value))
buf = allocUnsafe(signed.encodingLength(value))
}

@@ -76,3 +77,3 @@

if (buf == null) {
buf = new Uint8Array(zigzag.encodingLength(value))
buf = allocUnsafe(zigzag.encodingLength(value))
}

@@ -79,0 +80,0 @@

import type { Uint8ArrayList } from 'uint8arraylist'
import { LongBits } from 'longbits'
import { allocUnsafe } from './alloc.js'

@@ -61,3 +62,3 @@ const N1 = Math.pow(2, 7)

if (buf == null) {
buf = new Uint8Array(unsigned.encodingLength(value))
buf = allocUnsafe(unsigned.encodingLength(value))
}

@@ -86,3 +87,3 @@

if (buf == null) {
buf = new Uint8Array(signed.encodingLength(value))
buf = allocUnsafe(signed.encodingLength(value))
}

@@ -89,0 +90,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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