Skip to content

xhirazi/rn-gzip

Repository files navigation

rn-gzip

Gzip compression and decompression

Installation Guide

yarn add rn-gzip
or
npm install rn-gzip

Usage

import Gzip from 'rn-gzip';

let data="Hi I am Sherazi"
// compression
let compressed = Gzip.zip(data);

console.log(compressed); // eJzzyFTwVEjMVQjOSC1KrMoEACQGBP8=

// decompression
let decompressed = Gzip.unzip(compressed); 

console.log(decompressed); // Hi I am Sherazi

Base64

import { Base64 } from 'rn-gzip';

let string="Best tourist places in Pakistan";

let base64 = Base64.btoa(string); // QmVzdCB0b3VyaXN0IHBsYWNlcyBpbiBQYWtpc3Rhbg==

let normal = Base64.atob(base64); // Best tourist places in Pakistan

About

Gzip compression and decompression

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published