I have data coming from the API in the bzip2 compressed format. How do i decompress it to string in client side (jquery/js) ?
If client and server are designed to handle the application/x-bzip2
you don't have a lot of work to do. If you need to decompress raw streams you can try these libraries
https://github.com/antimatter15/bzip2.js
or
https://github.com/kirilloid/bzip2-js
If you're using npm you could look at
https://www.npmjs.com/package/bzip2
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.