Security News
vlt Debuts New JavaScript Package Manager and Serverless Registry at NodeConf EU
vlt introduced its new package manager and a serverless registry this week, innovating in a space where npm has stagnated.
Not supported, never supported. Take a look at compressjs, which incorporates some part of node-bzip.
node-bzip
is a pure-javascript Node.JS module adapted from antimatter15's pure-javascript implementation for decoding bzip2 data. node-bzip
currently only decodes buffers into other buffers, synchronously.
npm install node-bzip
After compressing some example data into example.bz2
, the following with recreate that original data and save it to example
.
var decodeBzip = require('node-bzip');
var fs = require('fs');
var compressedData = fs.readFileSync('example.bz2');
var data = decodeBzip(compressedData);
fs.writeFileSync('example', data);
require('node-bzip')
returns a function accepting one or two parameters:
function decodeBzip(Buffer inputBuffer, [Number expectedSize])
If expectedSize
is not present, decodeBzip
simply decodes inputBuffer
and returns the resulting Buffer
.
If expectedSize
is present, decodeBzip
will store the results in a Buffer
of length expectedSize
, and throw an error in the case that the size of the decoded data does not match expectedSize
.
Please note that this module is almost entirely untested and should not be used in a production environment!
Copyright © 2012 Eli Skeggs
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library; if not, see http://www.gnu.org/licenses/lgpl-2.1.html
FAQs
a pure-javascript Node.JS module for decoding bzip2 data
The npm package node-bzip receives a total of 0 weekly downloads. As such, node-bzip popularity was classified as not popular.
We found that node-bzip 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
vlt introduced its new package manager and a serverless registry this week, innovating in a space where npm has stagnated.
Security News
Research
The Socket Research Team uncovered a malicious Python package typosquatting the popular 'fabric' SSH library, silently exfiltrating AWS credentials from unsuspecting developers.
Security News
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.