3.0.0 • Published 10 days ago

minizlib v3.0.0

Weekly downloads
14,386,898
License
MIT
Repository
github
Last release
10 days ago

minizlib

A fast zlib stream built on minipass and Node.js's zlib binding.

This module was created to serve the needs of node-tar and minipass-fetch.

Brotli is supported in versions of node with a Brotli binding.

How does this differ from the streams in 'node:zlib'?

First, there are no convenience methods to compress or decompress a buffer. If you want those, use the built-in zlib module. This is only streams. That being said, Minipass streams to make it fairly easy to use as one-liners: new zlib.Deflate().end(data).read() will return the deflate compressed result.

This module compresses and decompresses the data as fast as you feed it in. It is synchronous, and runs on the main process thread. Zlib and Brotli operations can be high CPU, but they're very fast, and doing it this way means much less bookkeeping and artificial deferral.

Node's built in zlib streams are built on top of stream.Transform. They do the maximally safe thing with respect to consistent asynchrony, buffering, and backpressure.

See Minipass for more on the differences between Node.js core streams and Minipass streams, and the convenience methods provided by that class.

Classes

  • Deflate
  • Inflate
  • Gzip
  • Gunzip
  • DeflateRaw
  • InflateRaw
  • Unzip
  • BrotliCompress (Node v10 and higher)
  • BrotliDecompress (Node v10 and higher)

USAGE

import { BrotliDecompress } from 'minizlib'
// or: const BrotliDecompress = require('minizlib')

const input = sourceOfCompressedData()
const decode = new BrotliDecompress()
const output = whereToWriteTheDecodedData()
input.pipe(decode).pipe(output)

REPRODUCIBLE BUILDS

To create reproducible gzip compressed files across different operating systems, set portable: true in the options. This causes minizlib to set the OS indicator in byte 9 of the extended gzip header to 0xFF for 'unknown'.

tarnpm-registry-fetchminipass-fetchkilli8n-react-native-fast-imageidea-commonsgew-nodejs-api-client@frxf/frxf@texttree/demo-bsa-reference-rcl@fundefund/funde_ckeasycommands-beta@saeon/ol-react@saeon/quick-form@olivervorasai/slidercogoportutils@mink-opn/build-tokens@infinitebrahmanuniverse/nolb-miniz@saaspe/componentsexpand-react-bridgenode-gio@everything-registry/sub-chunk-2175jawwy-sdkreact-native-sphereuisphereuil2forlernahexyun.helpershubot-budahw9labtesttwoimg-sliceimg-sliceritsecljamuskalimjeuxuilogin-encrypt-ziomyui5librarychenmyui5librarymobong-search-dropdownmyreuselibraryneural_compressor_ext_lab_customizedneural_compressor_ext_lab_customized_2luojia-cli-devnodejsmasternovacap-componentsmd-vditorzzzxxxyyy321123emr-tabulator-tablesenefti-galeridynamics-contracts-xera-ckeditor5es-react-bridgegundam5eslint-config-k3cman-angularfirst-app-lyfucifacerecfixed_form_buildergh-monoproject-cligit-branching-workflowevanutilsgassefalsfn-lib-examplegamification-integration-newnuxtpaginations@parallelnft/web3modalquicknexpyreswap-sdkqdownloadorganization-algorithm-model-research-website-application-electronorganization-application-ui-ux-website-application-electronorganization-artificial-intelligence-computer-vision-website-application-electronorganization-robotics-sensors-website-application-electronpixiu-swap-corepixiuswap-libs-sdkpolyglot-component-libraryreact-native-awesome-module-latestreact-native-dimensions-layoutreact-native-brother-projectreact-native-fedlight-dsmreact-form-component-libraryparvan_componentsparvan_reactjs_componentsreact-native-rn-appreact-native-rtn-ips-poslin-testreact-native-sandycomponentreact-picky-with-clearreact-native-touch-id-namgyureact-solid-gradient-pickersequelcomponentselect2-selectallzona-x@eliteswap/v2-core@gteam_uz/create-me-app@enirisdev/angular-google-charts@hawkingnetwork/react-native-tab-view@hoaitt/ckeditor5-build-classic-mention@faizanhaider/iconsax@farvater/open-pedigree@fengmk2/tar@fanfic/proxy@idas1/ui-component-lib@igniswap/igni-swap-lib
3.0.0

10 days ago

2.1.2

4 years ago

2.1.1

4 years ago

2.1.0

4 years ago

2.0.0

4 years ago

1.3.3

4 years ago

1.3.2

5 years ago

1.3.1

5 years ago

1.3.0

5 years ago

1.2.2

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.1

5 years ago

1.1.0

6 years ago

1.0.4

6 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago

0.0.1

7 years ago