
Product
Announcing Precomputed Reachability Analysis in Socket
Socket’s precomputed reachability slashes false positives by flagging up to 80% of vulnerabilities as irrelevant, with no setup and instant results.
byte-data-stream
Advanced tools
Readable & writable byte data stream
const fs = require('fs');
const { ByteStream } = require('byte-data-stream');
let buf = fs.readFileSync('......'); // any ArrayBuffer or Uint8Array or nodejs Buffer
let stream = new ByteStream(buf);
stream.read_int8(); // read signed byte
stream.read_uint8(); // read unsigned byte
stream.read_bytes(8); // read many bytes
stream.read_int16(); // read signed big-endian 16-bit integer
stream.read_uint16(true); // read unsigned little-endian 16-bit integer
stream.read_var_uint(); // read unsigned big-endian varint
// ...
stream.write_int8(96); // write signed byte
stream.write_uint8(192); // write unsigned byte
stream.write_bytes([19,72,11,21,19,72,11,21]); // write many bytes
stream.write_int16(1972); // write signed big-endian 16-bit integer
stream.write_uint16(49861,true); // write unsigned little-endian 16-bit integer
stream.write_var_uint(92736296525); // write unsigned big-endian varint
// ...
// properties
stream.i; // position
stream.buffer; // ArrayBuffer
// methods for reading data
stream.read_int8();
stream.read_uint8();
stream.read_bytes(length);
stream.read_int16(little_endian);
stream.read_uint16(little_endian);
stream.read_int32(little_endian);
stream.read_uint32(little_endian);
stream.read_big_int64(little_endian);
stream.read_big_uint64(little_endian);
stream.read_float32(little_endian);
stream.read_float64(little_endian);
stream.read_var_int(little_endian,max_byte_length = Infinity);
stream.read_var_uint(little_endian,max_byte_length = Infinity);
// methods for writing data
stream.write_int8(val);
stream.write_uint8(val);
stream.write_bytes(bytes);
stream.write_int16(val,little_endian);
stream.write_uint16(val,little_endian);
stream.write_int32(val,little_endian);
stream.write_uint32(val,little_endian);
stream.write_big_int64(val,little_endian);
stream.write_big_uint64(val,little_endian);
stream.write_float32(val,little_endian);
stream.write_float64(val,little_endian);
stream.write_var_int(val,little_endian);
stream.write_var_uint(val,little_endian);
FAQs
Readable & writable byte data stream
The npm package byte-data-stream receives a total of 1 weekly downloads. As such, byte-data-stream popularity was classified as not popular.
We found that byte-data-stream 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.
Product
Socket’s precomputed reachability slashes false positives by flagging up to 80% of vulnerabilities as irrelevant, with no setup and instant results.
Product
Socket is launching experimental protection for Chrome extensions, scanning for malware and risky permissions to prevent silent supply chain attacks.
Product
Add secure dependency scanning to Claude Desktop with Socket MCP, a one-click extension that keeps your coding conversations safe from malicious packages.