https://github.com/laptou/ia-zip
Better ZIP parsing for Node.js
https://github.com/laptou/ia-zip
node-js zip
Last synced: 9 months ago
JSON representation
Better ZIP parsing for Node.js
- Host: GitHub
- URL: https://github.com/laptou/ia-zip
- Owner: laptou
- License: mit
- Archived: true
- Created: 2019-06-07T03:00:58.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2022-02-11T00:42:13.000Z (over 4 years ago)
- Last Synced: 2024-09-26T20:15:20.666Z (over 1 year ago)
- Topics: node-js, zip
- Language: TypeScript
- Size: 74.2 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# `ia-zip`
[](https://www.npmjs.com/package/ia-zip)

This package provides an API for reading and writing ZIP files.
> **Note**: this package is a work in progress. Right now, you can only read zip files.
# API
Docs generated using [`docts`](https://github.com/charto/docts)
>
>
> ### Interface [`ZipCentralDirectoryInfo`](#api-ZipCentralDirectoryInfo)
> Source code: [`<>`](http://github.com/laptou/ia-zip/blob/fdde2bc/src/parser.ts#L135-L145)
>
> Properties:
> > **.currentDiskNumber** number
> > **.startDiskNumber** number
> > **.entriesOnCurrentDisk** number
> > **.totalEntries** number
> > **.centralDirectorySize** number
> > **.centralDirectoryOffset** number
> > **.comment** string
> > **.isZip64** boolean
>
>
> ### Interface [`ZipEntryInfo`](#api-ZipEntryInfo)
> Source code: [`<>`](http://github.com/laptou/ia-zip/blob/fdde2bc/src/parser.ts#L99-L133)
>
> Properties:
> > **.vendor** number
> > **.version** number
> > The ZIP specification version of this file.
> > **.requiredVersion** number
> > The minimum ZIP specification version required to
> > open this file.
> > **.flags** number
> > **.compressionMethod** (undefined) | (undefined) | (undefined) | (undefined) | (undefined) | (undefined) | (undefined) | (undefined) | (undefined) | (undefined) | (undefined) | (undefined) | (undefined) | (undefined) | (undefined)
> > **.modificationTime** Date
> > **.crc32** number
> > **.compressedSize** number
> > **.uncompressedSize** number
> > **.fileName** string
> > **.fileComment** string
> > **.attributes** number
> > **.localHeaderOffset** number
>
>
> ### Class [`ZipReader`](#api-ZipReader)
> Source code: [`<>`](http://github.com/laptou/ia-zip/blob/fdde2bc/src/parser.ts#L147-L418)
>
> Methods:
> > **new( )** ⇒ [ZipReader](#api-ZipReader) [`<>`](http://github.com/laptou/ia-zip/blob/fdde2bc/src/parser.ts#L172)
> > ▪ data Buffer
> > **new( )** ⇒ [ZipReader](#api-ZipReader) [`<>`](http://github.com/laptou/ia-zip/blob/fdde2bc/src/parser.ts#L173)
> > ▪ filename string
> > **new( )** ⇒ [ZipReader](#api-ZipReader) [`<>`](http://github.com/laptou/ia-zip/blob/fdde2bc/src/parser.ts#L174)
> > ▪ stream Stream
> > **.ready( )** ⇒ Promise<void> [`<>`](http://github.com/laptou/ia-zip/blob/fdde2bc/src/parser.ts#L180-L183)
> > **.readInfo( )** ⇒ Promise<[ZipCentralDirectoryInfo](#api-ZipCentralDirectoryInfo)> [`<>`](http://github.com/laptou/ia-zip/blob/fdde2bc/src/parser.ts#L185-L258)
> > **.readEntries( )** ⇒ AsyncIterableIterator<[ZipEntryInfo](#api-ZipEntryInfo)> [`<>`](http://github.com/laptou/ia-zip/blob/fdde2bc/src/parser.ts#L260-L377)
> > **.readEntry( )** ⇒ Promise<Readable> [`<>`](http://github.com/laptou/ia-zip/blob/fdde2bc/src/parser.ts#L380-L412)
> > ▪ entry [ZipEntryInfo](#api-ZipEntryInfo)
> > **.close( )** ⇒ Promise<void> [`<>`](http://github.com/laptou/ia-zip/blob/fdde2bc/src/parser.ts#L414-L417)