From 7da79b64455076947ef5a7e4f352b0d1edfd206e Mon Sep 17 00:00:00 2001 From: Alan Shaw Date: Thu, 13 Feb 2020 15:19:14 +0000 Subject: [PATCH] perf: small bl (#101) This imports the `BufferList` class that does not extend duplex stream. This gets us one step closer to removing readable-stream from the bundle. --- src/coder/decode.js | 2 +- src/coder/encode.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/coder/decode.js b/src/coder/decode.js index 1832a04..c8d8682 100644 --- a/src/coder/decode.js +++ b/src/coder/decode.js @@ -1,7 +1,7 @@ 'use strict' const varint = require('varint') -const { BufferList } = require('bl') +const BufferList = require('bl/BufferList') // Decode a chunk and yield an _array_ of decoded messages module.exports = source => (async function * decode () { diff --git a/src/coder/encode.js b/src/coder/encode.js index 07a05b4..58fa055 100644 --- a/src/coder/encode.js +++ b/src/coder/encode.js @@ -1,7 +1,7 @@ 'use strict' const varint = require('varint') -const { BufferList } = require('bl') +const BufferList = require('bl/BufferList') const POOL_SIZE = 10 * 1024