New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

gzip-string

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gzip-string

Module for compressing strings using the browsers built in gzip zipping functionality.

latest
Source
npmnpm
Version
0.0.3
Version published
Weekly downloads
88
-14.56%
Maintainers
1
Weekly downloads
 
Created
Source

gzip-string

Module for compressing strings using the browsers built in gzip zipping functionality. Hence this module is made for browsers and have not been tested on server-side environments.

Install

npm install gzip-string

Example

import { compress, decompress } from 'gzip-string'

const compressedData = await compress([YOUR STRING])

const yourString = await decompress(compressedData)

Functions:

  • compress
  • decompress
  • compressToURI
  • decompressFromURI
compress(string, (encoding = 'gzip'))

Compresses the string using the browsers internal compression method.

decompress(string, (encoding = 'gzip'))

Decompresses the provided using the browsers internal decompression method.

compressToURI(string, (encoding = 'gzip'))

Compresses the string using the browsers internal compression method and makes sure it is safe to put in the URI.

decompressFromURI(string, (encoding = 'gzip'))

Decompresses URI encoded strings using the browsers internal compression.

Keywords

gzip

FAQs

Package last updated on 30 Oct 2023

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