Socket
Socket
Sign inDemoInstall

bl

Package Overview
Dependencies
11
Maintainers
2
Versions
61
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 5.1.0 to 6.0.0

36

BufferList.d.ts

@@ -215,2 +215,38 @@ export type BufferListAcceptedTypes =

readBigInt64BE: Buffer['readBigInt64BE'];
/**
* All of the standard byte-reading methods of the Buffer interface are implemented and will operate across internal Buffer boundaries transparently.
* See the [Buffer](http://nodejs.org/docs/latest/api/buffer.html) documentation for how these work.
*
* @param offset
*/
readBigInt64LE: Buffer['readBigInt64LE'];
/**
* All of the standard byte-reading methods of the Buffer interface are implemented and will operate across internal Buffer boundaries transparently.
* See the [Buffer](http://nodejs.org/docs/latest/api/buffer.html) documentation for how these work.
*
* @param offset
*/
readBigUInt64BE: Buffer['readBigUInt64BE'];
/**
* All of the standard byte-reading methods of the Buffer interface are implemented and will operate across internal Buffer boundaries transparently.
* See the [Buffer](http://nodejs.org/docs/latest/api/buffer.html) documentation for how these work.
*
* @param offset
*/
readBigUInt64LE: Buffer['readBigUInt64LE'];
/**
* All of the standard byte-reading methods of the Buffer interface are implemented and will operate across internal Buffer boundaries transparently.
* See the [Buffer](http://nodejs.org/docs/latest/api/buffer.html) documentation for how these work.
*
* @param offset
*/
readInt32BE: Buffer['readInt32BE'];

@@ -217,0 +253,0 @@

4

BufferList.js

@@ -353,2 +353,6 @@ 'use strict'

readFloatLE: 4,
readBigInt64BE: 8,
readBigInt64LE: 8,
readBigUInt64BE: 8,
readBigUInt64LE: 8,
readInt32BE: 4,

@@ -355,0 +359,0 @@ readInt32LE: 4,

@@ -0,1 +1,21 @@

## [6.0.0](https://github.com/rvagg/bl/compare/v5.1.0...v6.0.0) (2022-10-19)
### ⚠ BREAKING CHANGES
* **deps:** bump readable-stream from 3.6.0 to 4.2.0
* added bigint (Int64) support
### Features
* added bigint (Int64) support ([131ad32](https://github.com/rvagg/bl/commit/131ad3217b91090323513a8ea3ef179e8427cf47))
### Trivial Changes
* add TypeScript definitions for BigInt ([78c5ff4](https://github.com/rvagg/bl/commit/78c5ff489235a4e4233086c364133123c71acef4))
* **deps-dev:** bump typescript from 4.7.4 to 4.8.4 ([dba13e1](https://github.com/rvagg/bl/commit/dba13e1cadc5857dde6a9425e975faf2abbb270f))
* **deps:** bump readable-stream from 3.6.0 to 4.2.0 ([fa03eda](https://github.com/rvagg/bl/commit/fa03eda54b4412c0fdfc9053bd0b0bebaf80bfd9))
* **docs:** BigInt in API docs ([c68af50](https://github.com/rvagg/bl/commit/c68af500a04b2c3a14132ae6946412d2e39402d0))
## [5.1.0](https://github.com/rvagg/bl/compare/v5.0.0...v5.1.0) (2022-10-18)

@@ -2,0 +22,0 @@

8

package.json
{
"name": "bl",
"version": "5.1.0",
"version": "6.0.0",
"description": "Buffer List: collect buffers and access with a standard readable Buffer interface, streamable too!",

@@ -11,3 +11,3 @@ "license": "MIT",

"test:ci": "npm run lint && node test/test.js && npm run test:types",
"test:types": "tsc --allowJs --noEmit test/test.js",
"test:types": "tsc --target esnext --moduleResolution node --allowJs --noEmit test/test.js",
"build": "true"

@@ -34,3 +34,3 @@ },

"inherits": "^2.0.4",
"readable-stream": "^3.4.0"
"readable-stream": "^4.2.0"
},

@@ -42,3 +42,3 @@ "devDependencies": {

"tape": "^5.2.2",
"typescript": "~4.7.3"
"typescript": "~4.8.4"
},

@@ -45,0 +45,0 @@ "release": {

@@ -101,3 +101,3 @@ # bl *(BufferList)*

* <a href="#toString"><code>bl.<b>toString([encoding, [ start, [ end ]]])</b></code></a>
* <a href="#readXX"><code>bl.<b>readDoubleBE()</b></code>, <code>bl.<b>readDoubleLE()</b></code>, <code>bl.<b>readFloatBE()</b></code>, <code>bl.<b>readFloatLE()</b></code>, <code>bl.<b>readInt32BE()</b></code>, <code>bl.<b>readInt32LE()</b></code>, <code>bl.<b>readUInt32BE()</b></code>, <code>bl.<b>readUInt32LE()</b></code>, <code>bl.<b>readInt16BE()</b></code>, <code>bl.<b>readInt16LE()</b></code>, <code>bl.<b>readUInt16BE()</b></code>, <code>bl.<b>readUInt16LE()</b></code>, <code>bl.<b>readInt8()</b></code>, <code>bl.<b>readUInt8()</b></code></a>
* <a href="#readXX"><code>bl.<b>readDoubleBE()</b></code>, <code>bl.<b>readDoubleLE()</b></code>, <code>bl.<b>readFloatBE()</b></code>, <code>bl.<b>readFloatLE()</b></code>, <code>bl.<b>readBigInt64BE()</b></code>, <code>bl.<b>readBigInt64LE()</b></code>, <code>bl.<b>readBigUInt64BE()</b></code>, <code>bl.<b>readBigUInt64LE()</b></code>, <code>bl.<b>readInt32BE()</b></code>, <code>bl.<b>readInt32LE()</b></code>, <code>bl.<b>readUInt32BE()</b></code>, <code>bl.<b>readUInt32LE()</b></code>, <code>bl.<b>readInt16BE()</b></code>, <code>bl.<b>readInt16LE()</b></code>, <code>bl.<b>readUInt16BE()</b></code>, <code>bl.<b>readUInt16LE()</b></code>, <code>bl.<b>readInt8()</b></code>, <code>bl.<b>readUInt8()</b></code></a>
* <a href="#ctorStream"><code><b>new BufferListStream([ callback ])</b></code></a>

@@ -198,3 +198,3 @@

<a name="readXX"></a>
### bl.readDoubleBE(), bl.readDoubleLE(), bl.readFloatBE(), bl.readFloatLE(), bl.readInt32BE(), bl.readInt32LE(), bl.readUInt32BE(), bl.readUInt32LE(), bl.readInt16BE(), bl.readInt16LE(), bl.readUInt16BE(), bl.readUInt16LE(), bl.readInt8(), bl.readUInt8()
### bl.readDoubleBE(), bl.readDoubleLE(), bl.readFloatBE(), bl.readFloatLE(), bl.readBigIntBE(), bl.readBigIntLE(), bl.readBigUIntBE(), bl.readBigUIntLE(), bl.readInt32BE(), bl.readInt32LE(), bl.readUInt32BE(), bl.readUInt32LE(), bl.readInt16BE(), bl.readInt16LE(), bl.readUInt16BE(), bl.readUInt16LE(), bl.readInt8(), bl.readUInt8()

@@ -201,0 +201,0 @@ All of the standard byte-reading methods of the `Buffer` interface are implemented and will operate across internal Buffer boundaries transparently.

@@ -391,2 +391,36 @@ // @ts-check

tape('test readBigUInt64LE / readBigUInt64BE / readBigInt64LE / readBigInt64BE', function (t) {
const buf1 = Buffer.alloc(1)
const buf2 = Buffer.alloc(3)
const buf3 = Buffer.alloc(2)
const buf4 = Buffer.alloc(5)
const bl = new BufferListStream()
buf1[0] = 0x05
buf2[0] = 0x07
buf2[1] = 0x03
buf2[2] = 0x04
buf3[0] = 0x23
buf3[1] = 0x42
buf4[0] = 0x00
buf4[1] = 0x01
buf4[2] = 0x02
buf4[3] = 0x03
buf4[4] = 0x04
bl.append(buf1)
bl.append(buf2)
bl.append(buf3)
bl.append(buf4)
t.equal(bl.readBigUInt64BE(2), 0x0304234200010203n)
t.equal(bl.readBigUInt64LE(2), 0x0302010042230403n)
t.equal(bl.readBigInt64BE(2), 0x0304234200010203n)
t.equal(bl.readBigInt64LE(2), 0x0302010042230403n)
t.end()
})
tape('test readUIntLE / readUIntBE / readIntLE / readIntBE', function (t) {

@@ -393,0 +427,0 @@ const buf1 = Buffer.alloc(1)

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc