Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wh0/zzzzip-v2
https://github.com/wh0/zzzzip-v2
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/wh0/zzzzip-v2
- Owner: wh0
- Created: 2015-05-30T19:39:58.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-11-04T07:34:07.000Z (about 9 years ago)
- Last Synced: 2023-03-27T18:12:27.712Z (over 1 year ago)
- Language: JavaScript
- Size: 125 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Here's some code for generating zip files.
It doesn't actually compress; it just stores.
And it's not entirely compliant with the spec.
There's just barely enough functionality to make it able to work with Firefox.
Like, the local file headers and the end of central dir signature are almost entirely blank.You give it some data and filenames.
You get a Blob.zip(type, entries)
- `type` is the MIME type of the Blob.
- `entries` is an array of objects with the following properties:
- `name` is the filename of the entry.
- `data` is the data of the entry.You have to give names and data as some value `v` such that `v.length` is the byte-length of however the Blob constructor would serialize `v`.
That means you can pass ASCII strings and Uint8Arrays.