npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

react-native-nitro-tar-gzip

v0.0.3

Published

A React Native Nitro module for decompressing Gzip and Tar files.

Readme

React Native Nitro TarGzip

A React Native Nitro module for decompressing Gzip and Tar files.

This library is a rewrite of FWC1994/react-native-gzip library using Nitro modules, Swift and Kotlin.

Like for original library, this is based on following native libraries:

The APIs are similare to FWC1994/react-native-gzip ones at the exception of the returned value.

  • FWC1994/react-native-gzip:
    • methods did return a string containing the destination path
    • methods did throw if errors occured
  • react-native-nitro-tar-gzip:
    • methods do return an object containing success and failure info
    • methods do not throw if errors occur

Requirements

This library requires:

  • Reat-native 0.75 or higher
  • Xcode 16 or higher
  • Android compileSDK 34 or higher

Installation

[!IMPORTANT]
This package requires react-native-nitro-modules to be installed first. See react-native-nitro-modules for more information.

First install dependencies:

npm install --save react-native-nitro-tar-gzip react-native-nitro-modules

Then in your project's Podfile add:

pod 'NVHTarGzip', :modular_headers => true

NVHTarGzip requires modular_headers to be used by Swift package manager. If you know how to implement this on module side and remove this requirement, PR appreciated :smile:

Usage

import { unGzip, unGzipTar, unTar } from 'react-native-nitro-tar-gzip';

const sourcePath = `${PATH}/xxx.gz`
const targetPath = `${PATH}/xxx`

// Decompress Gzip
const result = await unGzip(sourcePath, targetPath, true)

// Decompress Tar
const result = await unTar(sourcePath, targetPath, true)

// Decompress Gzip and Tar
const result = await unGzipTar(sourcePath, targetPath, true)

// Handle the decompressing result
if (result.success) {
  console.log(result.path)
} else {
  console.error(result.error)
}

Parameters

| Name | Type | Description | Mandatory | | ---- | ---- | ---- | ---- | | sourcePath | string | compressed source file path | true | | targetPath | string | target file or folder path for decompressed output | true | | force | boolean | whether to overwrite the target path | true |

Returned object

// When method success
{
  success: true,
  path: 'some_target_path'
}

// When method fails
{
  success: false,
  reason: 'Reason of the failure'
}