🚨 Active Supply Chain Attack:node-ipc Package Compromised.Learn More
Socket
Book a DemoSign in
Socket

@javascriptcommon/react-native-xz

Package Overview
Dependencies
Maintainers
3
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@javascriptcommon/react-native-xz

Native XZ/LZMA2 decompression for React Native (TurboModules)

latest
Source
npmnpm
Version
1.1.2
Version published
Weekly downloads
22
214.29%
Maintainers
3
Weekly downloads
 
Created
Source

react-native-xz

Native XZ/LZMA2 decompression for React Native. Provides fast, efficient decompression of .xz files using native libraries on both iOS and Android.

Features

  • Native XZ/LZMA2 decompression
  • Decompress files to disk or directly to string
  • iOS: Uses SWCompression
  • Android: Uses XZ for Java
  • Supports React Native 0.72+

Installation

npm install @javascriptcommon/react-native-xz
# or
yarn add @javascriptcommon/react-native-xz

iOS

cd ios && pod install

Android

No additional setup required.

Usage

import { decompressFile, decompressToString } from '@javascriptcommon/react-native-xz';

// Decompress a file to another file
const outputPath = await decompressFile('/path/to/file.xz', '/path/to/output');

// Decompress a file directly to a string
const content = await decompressToString('/path/to/file.xz');

API

decompressFile(inputPath: string, outputPath: string): Promise<string>

Decompresses an XZ file to a destination path.

  • inputPath: Path to the .xz compressed file
  • outputPath: Path where decompressed file will be written
  • Returns: Promise resolving to the output path

decompressToString(inputPath: string): Promise<string>

Decompresses an XZ file and returns the contents as a UTF-8 string.

  • inputPath: Path to the .xz compressed file
  • Returns: Promise resolving to the decompressed string content

Requirements

  • React Native >= 0.72.0
  • iOS >= 13.0
  • Android minSdk >= 21

License

MIT

Keywords

react-native

FAQs

Package last updated on 31 Jan 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