UZIP.js | Simple ZIPping library for Javascript | Compression library
kandi X-RAY | UZIP.js Summary
kandi X-RAY | UZIP.js Summary
Simple, tiny and fast ZIP library. It has our own DEFLATE compressor and decompressor (alternative to pako.js / ZLIB). It was made from scratch, without using existing implemetnations. UZIP.js is faster than pako.js.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of UZIP.js
UZIP.js Key Features
UZIP.js Examples and Code Snippets
Community Discussions
Trending Discussions on UZIP.js
QUESTION
I need to decompress Base64-encoded gzip
or deflate
data from JavaScript without adding much to the bundle size (this is why I can't just use pako
). I found a nice, small library for decompressing deflate
data called UZIP
.
It appears that gzip
is just deflate
with a 10-byte header and an 8-byte footer. The data is guaranteed not to not have any corruption and not have any extra headers beyond those ten bytes. With all this in mind, I assumed that I could just Base64 decode the data, convert it to a Uint8Array
, and slice off the header and footer.
ANSWER
Answered 2020-Mar-04 at 00:53I found that the deflate
spec does not include headers, but zlib
does, and many libraries call zlib
decompression inflate
, while calling true inflation inflateRaw
. I changed my method calls from inflate
to inflateRaw
and it immediately worked.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install UZIP.js
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page