Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

uzip

Package Overview
Dependencies
Maintainers
2
Versions
450
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

uzip

Simple, tiny and fast ZIP library. It has our own DEFLATE compressor and decompressor (alternative to pako.js / ZLIB). It was made from scratch, without using existing implemetnations.

  • 0.20201122.0
  • npm
  • Socket score

Version published
Weekly downloads
172K
increased by53.27%
Maintainers
2
Weekly downloads
 
Created

What is uzip?

The uzip npm package is a lightweight library for handling ZIP file operations in JavaScript. It allows you to create, read, and extract ZIP files efficiently.

What are uzip's main functionalities?

Create ZIP File

This feature allows you to create a ZIP file from a set of files. The code sample demonstrates how to create a ZIP file containing a single text file named 'hello.txt' with the content 'Hello, World!'.

const UZIP = require('uzip');
const files = {
  'hello.txt': new TextEncoder().encode('Hello, World!')
};
const zipData = UZIP.encode(files);
console.log(zipData);

Extract ZIP File

This feature allows you to extract files from a ZIP archive. The code sample shows how to parse a ZIP file's binary data and extract its contents.

const UZIP = require('uzip');
const zipData = /* some binary data representing a ZIP file */;
const files = UZIP.parse(zipData);
console.log(files);

List Files in ZIP

This feature allows you to list the files contained in a ZIP archive. The code sample demonstrates how to parse a ZIP file and list the names of the files it contains.

const UZIP = require('uzip');
const zipData = /* some binary data representing a ZIP file */;
const files = UZIP.parse(zipData);
const fileNames = Object.keys(files);
console.log(fileNames);

Other packages similar to uzip

FAQs

Package last updated on 22 Nov 2020

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc