chore(utils): add getChunkSize to bufferUtils

This commit is contained in:
Szymon Lesisz
2023-08-30 18:13:37 +02:00
committed by martin
parent f9f576ab66
commit 2d6341005e

View File

@@ -9,3 +9,9 @@ export const reverseBuffer = (src: Buffer) => {
}
return buffer;
};
export const getChunkSize = (n: number) => {
const buf = Buffer.allocUnsafe(1);
buf.writeUInt8(n);
return buf;
};