Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
buffer-array
Advanced tools
The Buffer with Array API
const ba = require('buffer-array')
var buf = ba(4)
buf.push(new Buffer([0, 0x0a]))
var x = buf.popInt16BE() // x == 10
constructor(data: Buffer): BufferArray
constructor(size: Number): BufferArray
Create new instance of buffer-array
with fixed-size buffer
seek(pos: Number): void
seek(): Number
Set / get current pointer position.
var packet = ba(38)
packet.pushInt32BE(640)
packet.seek() // == 4
packet.length // == 38
length: Number
Get length of the internal buffer
clear(): void
Remove all written data and set pointer position to 0.
toBuffer(): Buffer
Get internal buffer (not a copy)
push(data: Buffer): bool
Write buffer data
to the end
pushDoubleBE(data: Number): bool
pushDoubleLE(data: Number): bool
pushFloatBE(data: Number): bool
pushFloatLE(data: Number): bool
pushInt32BE(data: Number): bool
pushInt32LE(data: Number): bool
pushInt16BE(data: Number): bool
pushInt16LE(data: Number): bool
pushUInt32BE(data: Number): bool
pushUInt32LE(data: Number): bool
pushUInt16BE(data: Number): bool
pushUInt16LE(data: Number): bool
pushInt8(data: Number): bool
pushUInt8(data: Number): bool
Write fixed-size number to the end
pop(size: Number): Buffer
Read size
bytes from the end and return buffer. Return undefined
if out of bounds.
popDoubleBE(): Number
popDoubleLE(): Number
popFloatBE(): Number
popFloatLE(): Number
popInt32BE(): Number
popInt32LE(): Number
popInt16BE(): Number
popInt16LE(): Number
popUInt32BE(): Number
popUInt32LE(): Number
popUInt16BE(): Number
popUInt16LE(): Number
popInt8(): Number
popUInt8(): Number
Read fixed-size number from the end. Return undefined
if out of bounds.
shift(size: Number): Buffer
Read size
bytes from the beginning and return buffer. Return undefined
if out of bounds.
shiftDoubleBE(): Number
shiftDoubleLE(): Number
shiftFloatBE(): Number
shiftFloatLE(): Number
shiftInt32BE(): Number
shiftInt32LE(): Number
shiftInt16BE(): Number
shiftInt16LE(): Number
shiftUInt32BE(): Number
shiftUInt32LE(): Number
shiftUInt16BE(): Number
shiftUInt16LE(): Number
shiftInt8(): Number
shiftUInt8(): Number
Read fixed-size number from the beginning. Return undefined
if out of bounds.
unshift(data: Buffer): bool
Write buffer data
to the beginning
unshiftDoubleBE(data: Number): bool
unshiftDoubleLE(data: Number): bool
unshiftFloatBE(data: Number): bool
unshiftFloatLE(data: Number): bool
unshiftInt32BE(data: Number): bool
unshiftInt32LE(data: Number): bool
unshiftInt16BE(data: Number): bool
unshiftInt16LE(data: Number): bool
unshiftUInt32BE(data: Number): bool
unshiftUInt32LE(data: Number): bool
unshiftUInt16BE(data: Number): bool
unshiftUInt16LE(data: Number): bool
unshiftInt8(data: Number): bool
unshiftUInt8(data: Number): bool
Write fixed-size number to the beginning
MIT, 2016 (c) Dmitry Tsvettsikh
FAQs
The Buffer with Array API
The npm package buffer-array receives a total of 3 weekly downloads. As such, buffer-array popularity was classified as not popular.
We found that buffer-array demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.