![New axobject-query Maintainer Faces Backlash Over Controversial Decision to Support Legacy Node.js Versions](https://cdn.sanity.io/images/cgdhsj6q/production/86e6ebdea652d20da070ebbda20134b839972db7-1024x1024.webp?w=800&fit=max&auto=format)
Security News
New axobject-query Maintainer Faces Backlash Over Controversial Decision to Support Legacy Node.js Versions
A JavaScript library maintainer is under fire after merging a controversial PR to support legacy versions of Node.js.
hypercore-byte-stream
Advanced tools
Readme
A Readable stream wrapper around Hypercore that supports reading byte ranges.
When provided with optional start/end block heuristics, this module will efficiently sync only those blocks which contain the specified range.
Supports asynchronously specifying stream options, as well as the input feed, to remove the need for additional stream management modules like duplexify
.
Most of the code has been extracted from Hyperdrive.
The following example will return a byte stream of the entire input feed.
const ram = require('random-access-memory')
const hypercore = require('hypercore')
const createByteStream = require('hypercore-byte-stream')
let core = hypercore(ram)
let stream = createByteStream({
feed: core
})
stream = createStream([options])
Creates a new byte stream.
If specified, options can include:
{
feed: core, // A hypercore.
byteOffset: 0, // Starting offset in bytes from the start of the feed.
byteLength: 10, // The number of bytes to read.
blockOffset: 0, // An optional starting block heuristic (optimization).
blockLength: 10 // An optional block length that should contain the entire range (optimization).
}
stream.start([options])
Starts downloading and streaming according to the specified options.
Options are the same as in createStream
. If a feed
was specified in the stream constructor, then one should not provide
another stream in the start
options.
MIT
FAQs
A Readable stream wrapper around Hypercore that supports reading byte ranges.
The npm package hypercore-byte-stream receives a total of 5 weekly downloads. As such, hypercore-byte-stream popularity was classified as not popular.
We found that hypercore-byte-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.
Security News
A JavaScript library maintainer is under fire after merging a controversial PR to support legacy versions of Node.js.
Security News
Results from the 2023 State of JavaScript Survey highlight key trends, including Vite's dominance, rising TypeScript adoption, and the enduring popularity of React. Discover more insights on developer preferences and technology usage.
Security News
The US Justice Department has penalized two consulting firms $11.3 million for failing to meet cybersecurity requirements on federally funded projects, emphasizing strict enforcement to protect sensitive government data.