compression code in javascript ?

P

Pierre

hi,

is there somewhere an implementation of some compression algorithm zip/
gzip/other ?

Pierre
 
J

Jeremy J Starcher

hi,

is there somewhere an implementation of some compression algorithm zip/
gzip/other ?

Pierre

Searching for "javascript coompression" with Google resulted in this hit
in the #5 slot.

<URL: http://rumkin.com/tools/compression/compress_huff.php >

(Note: For files of any size WORTH compressing, I can't imagine this
being a good idea. Javascript would run too slow for any real-world
purpose. If you are trying to reduce file transfer size, you would be
better to make sure that gzip is enable on your server.

If you are trying to obfuscate strings for some kind of online game,
ROT13 or some other simple cypher may serve you better.

If you are looking for some kind of security, you are not likely to find
it with this approach.)
 
E

emil

Pierre pisze:
hi,

is there somewhere an implementation of some compression algorithm zip/
gzip/other ?

Pierre
I have written once an implementation of LZW algorithm in JavaScript,
but this was just for fun. JavaScript is too slow to cope with such
task. A 20kB text was being compressed about 6 secs (code was not
optimized). And there are other problems. If you were to pass compressed
string via HTTP, you'll have to encode it as base64 or so, and such
operation will throw away all spare space you can gain with compression.

If you want sample code feel free to email me emjot(at)poczta.onet.pl.

emil
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top