From 0c1d5c62d53fbd22ca975cadff8a838717d7fa6b Mon Sep 17 00:00:00 2001 From: El RIDO Date: Sun, 16 Aug 2015 13:02:27 +0200 Subject: [PATCH] updated de/inflate to versions 0.5/0.3, using versions found at https://github.com/dankogai/js-deflate/commit/a3725d3beead1137ae010bb36e50e56f3b50c867 kudos Dan Kogai --- js/{rawdeflate.js => rawdeflate-0.5.js} | 16 ++++++++++------ js/{rawinflate.js => rawinflate-0.3.js} | 14 ++++++++------ tpl/page.html | 4 ++-- 3 files changed, 20 insertions(+), 14 deletions(-) rename js/{rawdeflate.js => rawdeflate-0.5.js} (99%) rename js/{rawinflate.js => rawinflate-0.3.js} (98%) diff --git a/js/rawdeflate.js b/js/rawdeflate-0.5.js similarity index 99% rename from js/rawdeflate.js rename to js/rawdeflate-0.5.js index d6a0752..0a34cf5 100644 --- a/js/rawdeflate.js +++ b/js/rawdeflate-0.5.js @@ -1,11 +1,13 @@ /* - * $Id: rawdeflate.js,v 0.3 2009/03/01 19:05:05 dankogai Exp dankogai $ + * $Id: rawdeflate.js,v 0.5 2013/04/09 14:25:38 dankogai Exp dankogai $ * + * GNU General Public License, version 2 (GPL-2.0) + * http://opensource.org/licenses/GPL-2.0 * Original: - * http://www.onicos.com/staff/iz/amuse/javascript/expert/deflate.txt + * http://www.onicos.com/staff/iz/amuse/javascript/expert/deflate.txt */ -(function(){ +(function(ctx){ /* Copyright (C) 1999 Masanao Izumo * Version: 1.0.1 @@ -753,6 +755,7 @@ var zip_init_deflate = function() { zip_qhead = null; zip_outcnt = 0; zip_outoff = 0; + zip_match_available = 0; if(zip_compr_level <= 3) { @@ -763,6 +766,7 @@ var zip_init_deflate = function() { { zip_match_length = zip_MIN_MATCH - 1; zip_match_available = 0; + zip_match_available = 0; } zip_complete = false; @@ -1665,7 +1669,7 @@ var zip_deflate = function(str, level) { return aout.join(""); } -if (! window.RawDeflate) RawDeflate = {}; -RawDeflate.deflate = zip_deflate; +if (! ctx.RawDeflate) ctx.RawDeflate = {}; +ctx.RawDeflate.deflate = zip_deflate; -})(); +})(this); diff --git a/js/rawinflate.js b/js/rawinflate-0.3.js similarity index 98% rename from js/rawinflate.js rename to js/rawinflate-0.3.js index 05d843b..e40b18c 100644 --- a/js/rawinflate.js +++ b/js/rawinflate-0.3.js @@ -1,11 +1,13 @@ /* - * $Id: rawinflate.js,v 0.2 2009/03/01 18:32:24 dankogai Exp $ + * $Id: rawinflate.js,v 0.3 2013/04/09 14:25:38 dankogai Exp dankogai $ * + * GNU General Public License, version 2 (GPL-2.0) + * http://opensource.org/licenses/GPL-2.0 * original: - * http://www.onicos.com/staff/iz/amuse/javascript/expert/inflate.txt + * http://www.onicos.com/staff/iz/amuse/javascript/expert/inflate.txt */ -(function(){ +(function(ctx){ /* Copyright (C) 1999 Masanao Izumo * Version: 1.0.0.1 @@ -747,7 +749,7 @@ var zip_inflate = function(str) { return aout.join(""); } -if (! window.RawDeflate) RawDeflate = {}; -RawDeflate.inflate = zip_inflate; +if (! ctx.RawDeflate) ctx.RawDeflate = {}; +ctx.RawDeflate.inflate = zip_inflate; -})(); +})(this); diff --git a/tpl/page.html b/tpl/page.html index da81250..9e6998b 100644 --- a/tpl/page.html +++ b/tpl/page.html @@ -9,8 +9,8 @@ - - {if="$SYNTAXHIGHLIGHTING"} + + {if="$SYNTAXHIGHLIGHTING"} {/if}