Socket
Socket
Sign inDemoInstall

snappystream

Package Overview
Dependencies
34
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    snappystream

Framed Snappy streams


Version published
Weekly downloads
7.5K
increased by8.59%
Maintainers
1
Created
Weekly downloads
 

Changelog

Source

2.1.1

Patch Changes

  • e859a41: Actually remove int24

Readme

Source

snappystream

A Node.js library for supporting the Snappy framing format via streams. See the Snappy Framing Format Description for details.

Usage: SnappyStream and UnsnappyStream are Transform streams.

const {SnappyStream} = require('snappystream')
const fs = require('fs')

const inStream = fs.createReadStream('snappy.txt')
const snappyStream = new SnappyStream()
const outStream = fs.createWriteStream('snappy_frame.txt')

inStream.pipe(snappyStream).pipe(outStream)

UnsnappyStream constructor takes an optional argument verifyChecksums which is false by default.

const {UnsnappyStream} = require('snappysteam')
const fs = require('fs')

const inStream = fs.createReadStream('snappy_frame.txt')
const unsnappyStream = new UnsnappyStream(true)

unsnappyStream.on('end', function () {
  console.log(unsnappyStream.read())
})

inStream.pipe(unsnappyStream)

Keywords

FAQs

Last updated on 07 Aug 2023

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc