hypercore-byte-stream

A Readable stream around a Hypercore that supports reading byte ranges

Apache-2.0 18 个版本
安装
npm install hypercore-byte-stream
yarn add hypercore-byte-stream
pnpm add hypercore-byte-stream
bun add hypercore-byte-stream
README

hypercore-byte-stream

A Readable stream around a Hypercore that supports reading byte ranges.

npm install hypercore-byte-stream

Useful for media streaming

Usage

const ByteStream = require('hypercore-byte-stream')

// id is a blob id that sets the outer bounds for the stream
// should contain the following { blockOffset, blockLength, byteOffset, byteLength }

// options can be used be specify a byte range { start, length }
// other options include, { maxPrefetch }
// note that the stream will close the core session when done, ie it takes full ownership of it
const stream = new ByteStream(core, id, options)

// if the core only contains a single blob you can use the one helper to init the blob id for you
const unboundedStream = ByteStream.one(core, options)

License

Apache-2.0

版本列表
2.0.4 2026-06-15
2.0.3 2026-06-05
2.0.2 2025-05-22
2.0.1 2024-12-29
2.0.0 2024-12-29
1.0.12 2020-07-12
1.0.11 2020-07-07
1.0.10 2020-06-20
1.0.9 2020-06-12
1.0.8 2020-06-06
1.0.7 2020-06-04
1.0.6 2020-06-03
1.0.5 2019-08-07
1.0.4 2019-06-18
1.0.3 2019-02-13
1.0.2 2019-02-05
1.0.1 2019-01-31
1.0.0 2019-01-29