How to implement LZMA

  • 1
  • Question
  • Updated 9 years ago
  • Answered
How to implement LZMA in phone gap projects

Can any one help me
Photo of venkteshganesan05

venkteshganesan05

  • 15 Posts
  • 0 Reply Likes

Posted 9 years ago

  • 1
Photo of Andrew Lunny

Andrew Lunny

  • 1911 Posts
  • 199 Reply Likes
You may want to look at existing JavaScript implementations of the algorithm:
http://code.google.com/p/js-lzma/
Photo of venkteshganesan05

venkteshganesan05

  • 15 Posts
  • 0 Reply Likes
We tried this lzma implementation in phonegap project.
Application is hangsup with this lzma implementation.
Photo of Andrew Lunny

Andrew Lunny

  • 1911 Posts
  • 199 Reply Likes
This suggests running LZMA in PhoneGap may be too memory intensive for a mobile device.

If you're able to build PhoneGap apps on your personal development environment, I would recommend looking at the PhoneGap Google Group for plugins accessing zip compression.
Photo of Nilesh Wickham

Nilesh Wickham

  • 7 Posts
  • 0 Reply Likes
Andrew, turns out the server doesn't support LZMA, so although we got that working in the app, the server will not accept it.

The reason we need to compress is because we are uploading images from the app in base64, so the data transfer takes some time. The server admin would prefer us to use gzip, but zip would work as well.

Do you know of any way to compress the request using gzip or zip on device?