0.0.3 • Published 6 months ago

gzip-string v0.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

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.

0.0.3

6 months ago

0.0.2

7 months ago

0.0.1

7 months ago