101arrowz / fflate

High performance (de)compression in an 8kB package

Home Page:https://101arrowz.github.io/fflate

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Create zip with empty directory

ryanlin1986 opened this issue · comments

For example, I just want to create empty directory named test, the following code does not work.

zipSync({
  test: {}
})

This is probably something that should be supported for consistency, but you can do this instead:

zipSync({
  'test/': new Uint8Array(0)
})

Added support for the original syntax in v0.7.3. Thanks for the feature request!