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

compact-encoding

Package Overview
Dependencies
Maintainers
3
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

compact-encoding - npm Package Compare versions

Comparing version 2.5.0 to 2.5.1

4

index.js

@@ -138,2 +138,3 @@ const b = require('b4a')

decode (state) {
if (state.end - state.start < 4) throw new Error('Out of bounds')
const view = new DataView(state.buffer.buffer, state.start + state.buffer.byteOffset, 4)

@@ -156,2 +157,3 @@ const float = view.getFloat32(0, true) // little endian

decode (state) {
if (state.end - state.start < 8) throw new Error('Out of bounds')
const view = new DataView(state.buffer.buffer, state.start + state.buffer.byteOffset, 8)

@@ -256,3 +258,3 @@ const float = view.getFloat64(0, true) // little endian

const s = b.toString(state.buffer, 'utf8', state.start, state.start += len)
if (b.byteLength(s) !== len) throw new Error('Out of bounds')
if (b.byteLength(s) !== len || state.start > state.end) throw new Error('Out of bounds')
return s

@@ -259,0 +261,0 @@ }

{
"name": "compact-encoding",
"version": "2.5.0",
"version": "2.5.1",
"description": "A series of compact encoding schemes for building small and fast parsers and serializers",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -212,3 +212,3 @@ const enc = require('./')

t.exception(() => enc.uint32Array.decode(state))
t.exception(() => enc.uint32array.decode(state))
})

@@ -215,0 +215,0 @@

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