
Product
Socket for Jira Is Now Available
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.
it-length-prefixed-stream
Advanced tools
Read and write length-prefixed byte arrays over a duplex stream
$ npm i it-length-prefixed-stream
<script> tagLoading this module through a script tag will make it's exports available as ItLengthPrefixedStream in the global namespace.
<script src="https://unpkg.com/it-length-prefixed-stream/dist/index.min.js"></script>
> npm install it-pb-stream
import { lpStream } from 'it-length-prefixed-stream'
const stream = lpStream(duplex)
// read the next length-prefixed chunk
await stream.read()
// write a plain buffer, the length will be prefixed
await stream.write(buf)
//.. etc
Licensed under either of
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
FAQs
Read and write length-prefixed byte arrays over a duplex stream
We found that it-length-prefixed-stream demonstrated a healthy version release cadence and project activity because the last version was released less than 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 for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.