Security News
ESLint is Now Language-Agnostic: Linting JSON, Markdown, and Beyond
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
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 3 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
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
Security News
Members Hub is conducting large-scale campaigns to artificially boost Discord server metrics, undermining community trust and platform integrity.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.