title: String compression in JavaScript
body: <p>I'm looking for a JavaScript function that given a string returns a compressed (shorter) string.</p>
  
  <p>I'm developing a Chrome web application that saves long strings (HTML) to a local database. For testing purposes I tried to zip the file storing the database, and it shrank by a factor of five, so I figured it would help keep the database smaller if I compressed the things it stores.</p>
  
  <p>I've found an implementation of LZSS in JavaScript here: <a href="http://code.google.com/p/u-lzss/" rel="noreferrer">http://code.google.com/p/u-lzss/</a> ("U-LZSS").</p>
  
  <p>It seemed to work when I tested it "by hand" with short example strings (decode === encode), and it's reasonably fast too, in Chrome. But when given big strings (100 ko) it seems to garble/mix up the last half of the string.</p>
  
  <p>Is it possible that U-LZSS expects short strings and can't deal with larger strings? And would it be possible to adjust some parameters in order to move that upper limit?</p>