Latest Supply Chain Attack:Mini Shai-Hulud Hits @antv npm Packages, 639 Versions Compromised.Learn More
Socket
Book a DemoSign in
Socket

react-native-brotli-decompress

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-brotli-decompress

Brotli decompression for React Native (iOS & Android)Brotli decompression for eact Native (iOS & Android)

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

react-native-brotli-decompress

Brotli decompression for React Native (iOS & Android).

This library was built to solve a real production problem — our backend (Python Django) was compressing API responses with Brotli before sending them, reducing payload sizes by ~75%, but no React Native library existed to decompress them on the client side. Works with Brotli-compressed data from any backend language or library.

Decompresses Brotli-compressed data passed as a Base64 string and returns the decompressed UTF-8 string.

Installation

npm install react-native-brotli-decompress

Android

No additional steps required. The library uses the org.brotli:dec Java library which is included automatically.

iOS

cd ios && pod install

Usage

import { decompress } from 'react-native-brotli-decompress';

// Pass a Base64-encoded Brotli-compressed string
const decompressed = await decompress(base64EncodedData);
console.log(decompressed); // UTF-8 decoded string

API

decompress(base64Data: string): Promise<string>

ParameterTypeDescription
base64DatastringBase64-encoded Brotli-compressed data

Returns: Promise<string> — the decompressed UTF-8 string.

Throws:

  • INVALID_INPUT — if the input is not valid Base64
  • DECOMPRESSION_FAILED — if Brotli decompression fails
  • DECODING_FAILED — if the decompressed bytes are not valid UTF-8

Contributing

  • Development workflow
  • Sending a pull request
  • Code of conduct

License

MIT

Made with create-react-native-library

Keywords

react-native

FAQs

Package last updated on 18 May 2026

Did you know?

Socket

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