willSonic / jslzjb

Automatically exported from code.google.com/p/jslzjb
0 stars 0 forks source link

compress != decompress on Rhino #1

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

 The following code run on the Rhino javascript interpreter:
    var plaintext    = "Hello world!!!Hello world!!!";
    var compressed   = Iuppiter.compress(plaintext);
    var decompressed = Iuppiter.decompress(compressed);

What is the expected output? What do you see instead?

   decompressed == plaintext
   instead: 
      decompressed == "ell"

What version of the product are you using? On what operating system?

Rhino javascript interpreter 1.7R2

Original issue reported on code.google.com by shaz...@gmail.com on 9 Sep 2010 at 12:47

GoogleCodeExporter commented 9 years ago
The following example works on Rhino:

    var s = "Hello World!!!Hello World!!!Hello World!!!Hello World!!!";
    for(var i = 0; i < 10; i++) s+=s;

    var c = Iuppiter.compress(s);
    var d = Iuppiter.decompress(c);

    s == d

Original comment by shaz...@gmail.com on 9 Sep 2010 at 12:53