npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

minizip-asm.js

v1.0.10

Published

Minizip in javascript. Work with password. Demo: https://rf00.github.io/minizip-asm.js/example/

Downloads

11,577

Readme

minizip-asm.js

Build Status npm version

Minizip in javascript. Work with password. Demo: https://rf00.github.io/minizip-asm.js/example/

Features

  • Zip file
  • Extract file
  • Work with password

Installation

<script src="https://raw.githubusercontent.com/rf00/minizip-asm.js/master/lib/minizip-asm.min.js"></script>
npm install minizip-asm.js

var Minizip = require('minizip-asm.js');

Getting started

var fs = require("fs");

var text = new Buffer("Abc~~~");
var mz = new Minizip();

mz.append("haha/abc.txt", text, {password: "~~~"});
fs.writeFileSync("abc.zip", new Buffer(mz.zip()));

Usage

new Minizip(ArrayBuffer)

Constructor for making a new zip file or opening from existing one.

  • @ArrayBuffer {Buffer|Uint8Array} <optional> - It can be either Node.js Buffer read from zip file or Uint8Array in web browser.

  • @ Return an instance of Minizip.

mz.list(options)

List all files in Minizip with full filepath and have password or not.

  • @options <optional>

    • @encoding {"utf8"|"buffer"} <default="utf8"> - Since the filepath may not encode in utf8. It will be handy to have an ArrayBuffer to do detection on encoding.
  • @ Return an Array. Something like this:

    [{
      filepath: "haha/abc.txt",
      crypt: true // (type: boolean)
    }]

mz.extract(filepath, options)

Extract one file.

  • @filepath {String|Buffer|Uint8Array} - Full filepath to extract.

  • @options <optional>

    • @encoding {"utf8"|"buffer"} <default="buffer"> - File can return in text.

    • @password {String|Buffer|Uint8Array} <optional>

  • @ Return a Buffer.

mz.append(filepath, data, options)

Append one file.

  • @filepath {String|Buffer|Uint8Array} - Full filepath to extract.

  • @data {String|Buffer|Uint8Array} - File data.

  • @options <optional>

    • @password {String|Buffer|Uint8Array} <optional>

    • @compressLevel {Number} <default=5> - 0: Store only. 1: Compress faster. 9: Compress better.

  • @ Return nothing.

mz.zip()

Retrive zip file.

  • @ Return a Buffer.

Notice

  1. It is synchronize.
  2. The size of minizip-asm.min.js is around 0.6MB.
  3. Browser require >= IE11.