/usr/share/doc/node-zipfile/README.md is in node-zipfile 0.4.0+ds1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 | # node-zipfile
Bindings to [libzip](http://nih.at/libzip/libzip.html) for handling zipfile archives in [node](http://nodejs.org).
## Example
var zipfile = require('zipfile');
var zf = new zipfile.ZipFile('./test/data/world_merc.zip');
zf
{ names: [ 'world_merc.dbf', 'world_merc.prj', 'world_merc.shp', 'world_merc.shx' ],
count: 4 }
var buffer = zf.readFileSync('world_merc.prj');
buffer.toString()
'PROJCS["Google Maps Global Mercator",GEOGCS .... '
## Depends
node-zipfile 0.3.x depends on node v0.6 and above
node-zipfile 0.1.x-0.2.x works with node v0.2-v0.4
libzip (optionally, otherwise will build against bundled version)
## Installation
You can install the latest tag via npm:
npm install zipfile
Or install from github master:
git clone git://github.com/springmeyer/node-zipfile.git
cd node-zipfile
./configure
make
make install
## Dynamically linking against libzip
node-zipfile depends on libzip, but by default
bundles a copy in deps/ which is statically linked.
If you want to use an external libzip first install it:
Debian:
sudo apt-get install libzip-dev libzip1
OS X:
brew install libzip
Or from source:
wget http://nih.at/libzip/libzip-0.10.tar.bz2
tar xvf libzip-0.10.tar.bz2
cd libzip-0.10
./configure
make
sudo make install
Then on linux do:
sudo ldconfig
Now, configure node-zipfile with the --shared-libzip option:
./configure --shared-libzip
If you installed libzip in a custom location then configure like:
./configure --shared-libzip --libzip=/opt/local
Otherwise /usr/ and /usr/local will be searched for libzip:
./configure --shared-libzip
make
sudo make install
./test.js
## Building libzip with cmake on windows:
Note: needs cygwin so the .sh shell scripts work that libzip cmake files call.
git clone git://github.com/springmeyer/node-zipfile.git
cd node-zipfile/deps/
bsdtar xvf libzip-0.10.tar.bz2
cd libzip
mkdir build_vc100
cd build_vc100
cmake -DZLIB_LIBRARY=c:\dev2\zlib\zlib.lib -DZLIB_INCLUDE_DIR=c:\dev2\zlib -G"NMake Makefiles" -DCMAKE_BUILD_TYPE=Release ..\
Then edit lib\zipconf.h removing 'inttypes.h' with:
#include <stdint.h>
#include <limits.h>
Finally build libzip
nmake /f Makefile zip
Then compile node-zipfile:
TODO
## License
BSD, see LICENSE.txt
|