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

lzwcompress

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lzwcompress

Lossless LZW compression/decompression implemented in JavaScript for strings/JSON/JS objects.

latest
Source
npmnpm
Version
1.1.0
Version published
Weekly downloads
4.8K
17.18%
Maintainers
1
Weekly downloads
 
Created
Source

lzwCompress.js

npm CircleCI Appveyor Travis Coverage Status codecov FOSSA Status

Lossless LZW compression/decompression implemented in JavaScript for strings/JSON/JS objects.

Usage:

Install lzwCompress from npm:

npm install lzwcompress

And then to use it in your node.js applications:

import lzwCompress from 'lzwcompress';

const json = {
  name: 'Mr. JavaScript Kumar',
  age: 42,
  start_date: new Date(),
  address: {
    street: '123 MG Road',
    city: 'Mumbai',
    state: 'Maharashtra',
    country: 'India'
  }
};

// to compress objects
const compressed = lzwCompress.pack(json);

// to uncomress
const original = lzwCompress.unpack(compressed);

console.log(original);

Applies LZW compression and JSON key optimization and makes JSON (or any javascript object) smaller for local storage, to ship up to the server etc.

License

MIT License

FOSSA Status

Other Libraries

For use in Angular 1.X projects, check out the angular-lzwcompress module

Keywords

lzw

FAQs

Package last updated on 01 Jun 2021

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