Skip to content

Commit

Permalink
v0.0.4 updated dependencies, newless constructor, inflate at top
Browse files Browse the repository at this point in the history
  • Loading branch information
Kris Kowal committed Aug 12, 2011
1 parent fec7f6c commit 2c53008
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 28 deletions.
15 changes: 0 additions & 15 deletions CHANGES

This file was deleted.

25 changes: 25 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

# 0.0.4

- Updated dependencies.
- Reader no longer requires ``new`` keyword
- ``inflate`` module now at the root

# 0.0.3

- Fixed for NPM 1.0

# 0.0.2

- Removed a spurious buffer-io file that was confusing the
new Node module search algorithm.

# 0.0.1

- fixed a dependency on q-io

# 0.0.0

- ported from Tom Robinson's
<https://github.com/tlrobinson/zipjs> for Narwhal.

14 changes: 8 additions & 6 deletions README → README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@

var ZIP = require("zip");
var data = new Buffer(...);
var reader = new ZIP.Reader(data);
reader.toObject(charset_opt);
reader.forEach(function (entry) {});
reader.iterator();
```javascript
var ZIP = require("zip");
var data = new Buffer(...);
var reader = ZIP.Reader(data);
reader.toObject(charset_opt);
reader.forEach(function (entry) {});
reader.iterator();
```

Copyright 1999 Masanao Izumo <iz@onicos.co.jp> License Unknown
Copyright 2010 Tom Robinson (http://tlrobinson.net/) MIT License (enclosed)
Expand Down
File renamed without changes.
9 changes: 3 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "zip",
"version": "0.0.4",
"description": "An implementation of unzip for JavaScript",
"version": "0.0.3",
"keywords": [
"zip",
"compression"
Expand All @@ -23,16 +23,13 @@
}
],
"main": "zip.js",
"modules": {
"inflate": "./lib/inflate.js"
},
"repository": {
"type": "git",
"url": "git://github.com/kriskowal/zip.git"
},
"dependencies": {
"q": "0.2.10",
"q-io": "0.0.4",
"q": "0.7.1",
"q-io": "0.0.8",
"q-io-buffer": "0.0.0"
},
"devDependencies": {},
Expand Down
5 changes: 5 additions & 0 deletions test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
var ZIP = require("./zip");
var FS = require("fs");
var data = FS.readFileSync("zip.zip")
var reader = ZIP.Reader(data);
console.log(reader.toObject('utf-8'));
4 changes: 3 additions & 1 deletion zip.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
// Tom Robinson
// Kris Kowal

var INFLATE = require("./lib/inflate");
var INFLATE = require("./inflate");
var Buffer = require("buffer").Buffer;

var LOCAL_FILE_HEADER = 0x04034b50;
var CENTRAL_DIRECTORY_FILE_HEADER = 0x02014b50;
var END_OF_CENTRAL_DIRECTORY_RECORD = 0x06054b50;

var Reader = exports.Reader = function (data) {
if (!(this instanceof Reader))
return new Reader(data);
this._data = data;
this._offset = 0;
}
Expand Down
Binary file added zip.zip
Binary file not shown.

0 comments on commit 2c53008

Please sign in to comment.