Skip to content

Commit

Permalink
release 2.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
thejoshwolfe committed Jun 18, 2016
1 parent 1070546 commit 1efb566
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
20 changes: 18 additions & 2 deletions README.md
Expand Up @@ -18,7 +18,7 @@ Design principles:
Don't attempt to buffer entire files in RAM at once.
* Never crash (if used properly).
Don't let malformed zip files bring down client applications who are trying to catch errors.
* Catch unsafe filenames entries.
* Catch unsafe file names.
A zip file entry throws an error if its file name starts with `"/"` or `/[A-Za-z]:\//`
or if it contains `".."` path segments or `"\\"` (per the spec).

Expand Down Expand Up @@ -268,6 +268,8 @@ These fields are of type `Number`:
`String`.
Following the spec, the bytes for the file name are decoded with
`UTF-8` if `generalPurposeBitFlag & 0x800`, otherwise with `CP437`.
Alternatively, this field may be populated from the Info-ZIP Unicode Path Extra Field
(see `extraFields`).

If `fileName` would contain unsafe characters, such as an absolute path or
a relative directory, yauzl emits an error instead of an entry.
Expand All @@ -276,13 +278,25 @@ a relative directory, yauzl emits an error instead of an entry.

`Array` with each entry in the form `{id: id, data: data}`,
where `id` is a `Number` and `data` is a `Buffer`.

This library looks for and reads the ZIP64 Extended Information Extra Field (0x0001)
in order to support ZIP64 format zip files.

This library also looks for and reads the Info-ZIP Unicode Path Extra Field (0x7075)
in order to support some zipfiles that use it instead of General Purpose Bit 8
to convey `UTF-8` file names.
When the field is identified and verified to be reliable (see the zipfile spec),
the the file name in this field is stored in the `fileName` property,
and the file name in the central directory record for this entry is ignored.

None of the other fields are considered significant by this library.
Fields that this library reads are left unalterned in the `extraFields` array.

#### comment

`String` decoded with the same charset as used for `fileName`.
`String` decoded with the the charset indicated by `generalPurposeBitFlag & 0x800`
as with the `fileName`.
(The Info-ZIP Unicode Path Extra Field has no effect on the charset used for this field.)

#### getLastModDate()

Expand Down Expand Up @@ -439,6 +453,8 @@ This library makes no attempt to interpret the Language Encoding Flag.

## Change History

* 2.6.0
* Support Info-ZIP Unicode Path Extra Field, used by WinRAR for Chinese file names. [issue #33](https://github.com/thejoshwolfe/yauzl/issues/33)
* 2.5.0
* Ignore malformed Extra Field that is common in Android .apk files. [issue #31](https://github.com/thejoshwolfe/yauzl/issues/31)
* 2.4.3
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "yauzl",
"version": "2.5.0",
"version": "2.6.0",
"description": "yet another unzip library for node",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 1efb566

Please sign in to comment.