
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
react-native-nitro-zlib
Advanced tools
Node.js Zlib implementation for React Native using Nitro Modules and Rust
High-performance, 100% Node.js compatible Zlib module for React Native, powered by Nitro Modules and Rust.
flate2 & brotli crates), bridging directly to C++ via Nitro Modules with zero JSI serialization overhead.Readable, Writable, and .pipe() operations.Sync) and callback-based asynchronous APIs.crc32 calculation.yarn add react-native-nitro-zlib
# or
npm install react-native-nitro-zlib
cd ios && pod install
Ideal for small files or latency-critical scenarios.
import zlib from 'react-native-nitro-zlib';
import { Buffer } from 'buffer';
const input = Buffer.from('hello world');
// Gzip Compression
const compressed = zlib.gzipSync(input);
// Gzip Decompression
const decompressed = zlib.gunzipSync(compressed);
console.log(decompressed.toString()); // 'hello world'
// Brotli Compression (Sync)
const brotliOut = zlib.brotliCompressSync(input);
Provides the same asynchronous callback interface as Node.js.
import zlib from 'react-native-nitro-zlib';
zlib.deflate('some data', (err, buffer) => {
if (!err) {
console.log('Compressed buffer:', buffer);
}
});
Ideal for handling large files, supporting pipe operations.
import zlib from 'react-native-nitro-zlib';
// Can be used with other Transform streams or Nitro streams
const gzip = zlib.createGzip();
const gunzip = zlib.createGunzip();
gzip.pipe(gunzip).on('data', (chunk) => {
console.log('Decompressed chunk:', chunk);
});
gzip.write('This is data for streaming compression');
gzip.end();
import zlib from 'react-native-nitro-zlib';
import { Buffer } from 'buffer';
// Calculate CRC32
const crc = zlib.crc32(Buffer.from('Hello World'));
console.log('CRC32:', crc.toString(16)); // 4a17b156
// Access Constants
console.log(zlib.constants.Z_BEST_COMPRESSION); // 9
| API | Status | Notes |
|---|---|---|
deflate / Sync | ✅ Supported | |
inflate / Sync | ✅ Supported | |
gzip / Sync | ✅ Supported | |
gunzip / Sync | ✅ Supported | |
brotliCompress / Sync | ✅ Supported | |
brotliDecompress / Sync | ✅ Supported | |
createGzip / createGunzip | ✅ Supported | Stream Factory |
createBrotliCompress | ✅ Supported | Stream Factory |
crc32 | ✅ Supported | |
constants | ✅ Supported |
The project consists of three main components:
rust_c_zlib): Wraps flate2 and brotli crates.readable-stream.ISC
FAQs
Node.js Zlib implementation for React Native using Nitro Modules and Rust
The npm package react-native-nitro-zlib receives a total of 24 weekly downloads. As such, react-native-nitro-zlib popularity was classified as not popular.
We found that react-native-nitro-zlib 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.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.