From 51bd62d0b8e98ff982f083726a67adcd843bfdf4 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Thu, 8 Apr 2021 12:40:30 +0200 Subject: [PATCH] remove unused method --- lib/serialization/BinaryMiddleware.js | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/lib/serialization/BinaryMiddleware.js b/lib/serialization/BinaryMiddleware.js index c685102fecc..62ab152c2b8 100644 --- a/lib/serialization/BinaryMiddleware.js +++ b/lib/serialization/BinaryMiddleware.js @@ -114,31 +114,6 @@ const identifyNumber = n => { * @extends {SerializerMiddleware} */ class BinaryMiddleware extends SerializerMiddleware { - static optimizeSerializedData(data) { - const result = []; - const temp = []; - const flush = () => { - if (temp.length > 0) { - if (temp.length === 1) { - result.push(temp[0]); - } else { - result.push(Buffer.concat(temp)); - } - temp.length = 0; - } - }; - for (const item of data) { - if (Buffer.isBuffer(item)) { - temp.push(item); - } else { - flush(); - result.push(item); - } - } - flush(); - return result; - } - /** * @param {DeserializedType} data data * @param {Object} context context object