<commit_before>/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- /
/* vim: set shiftwidth=4 tabstop=8 autoindent cindent expandtab: */

var Stream = (function() {
    function constructor(arrayBuffer) {
        this.bytes = Uint8Array(arrayBuffer);
        this.pos = 0;
        this.start = 0;
    }

    constructor.prototype = {
        get length() {
            return this.bytes.length;
        },
        reset: function() {
            this.pos = this.start;
        },
        getByte: function() {
            var bytes = this.bytes;
            if (this.pos >= bytes.length)
                return;
            return bytes[this.pos++];
        },
        lookChar: function() {
            var bytes = this.bytes;
            if (this.pos >= bytes.length)
                return;
            return String.fromCharCode(bytes[this.pos]);
        },
        getChar: function() {
            var ch = this.lookChar();
            if (!ch)
                return ch;
            this.pos++;
            return ch;
        },
        putBack: function() {
            this.pos--;
        },
        skipChar: function() {
            this.pos++;
        },
        skip: function(n) {
            this.pos += n;
        },
        moveStart: function() {
            this.start = this.pos;
        },
        find: function(needle, limit, backwards) {
            var length = this.bytes.length;
            var pos = this.pos;
            var str = "";
            if (pos + limit > length)
                limit = length - pos;
            for (var n = 0; n < limit; ++n)
                str += this.getChar();
            this.pos = pos;
            var index = backwards ? str.lastIndexOf(needle) : str.indexOf(needle);
            if (index == -1)
                return false; /* not found */
            this.pos += index;
            return true; /* found */
        },
        asString: function() {
            var str = "";
            var ch;
            while (!!(ch = this.getChar()))
                str += ch;
            return str;
        },
        makeSubStream: function(pos, length) {
            return new Stream(new Uint8Array(this.bytes, pos, length));
        }
    };

    return constructor;
})();

var StringStream = (function() {
    function constructor(str) {
        var length = str.length;
        var bytes = new Uint8Array(length);
        for (var n = 0; n < length; ++n)
            bytes[n] = str.charCodeAt(n);
        Stream.call(this, bytes);
    }

    constructor.prototype = Stream.prototype;

    return constructor;
})();

var Buffer = (function() {
    function constructor(length) {
        this.bytes = new Uint8Array(length ? length : 4096);
        this.pos = 0;
    }

    constructor.prototype = {
        putByte: function(b) {
            var bytes = this.bytes;
            var length = bytes.length;
            if (this.pos >= length) {
                var newBytes = new Uint8Array(length * 2);
                for (var n = 0; n < length; ++n)
                    newBytes[n] = bytes[n];
                bytes = newBytes;
            }
            bytes[this.pos++] = b;
        },
        asStream: function() {
            return new Stream(this.bytes);
        }
    }

    return constructor;
})();

var FlateStream = (function() {
    function constructor() {
    }

    constructor.prototype = {
    };

    return constructor;
})();

var DecryptStream = (function() {<commit_msg>beginnings of inflate decompression<commit_after>/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- /
/* vim: set shiftwidth=4 tabstop=8 autoindent cindent expandtab: */

var Stream = (function() {
    function constructor(arrayBuffer) {
        this.bytes = Uint8Array(arrayBuffer);
        this.pos = 0;
        this.start = 0;
    }

    constructor.prototype = {
        get length() {
            return this.bytes.length;
        },
        reset: function() {
            this.pos = this.start;
        },
        getByte: function() {
            var bytes = this.bytes;
            if (this.pos >= bytes.length)
                return;
            return bytes[this.pos++];
        },
        lookChar: function() {
            var bytes = this.bytes;
            if (this.pos >= bytes.length)
                return;
            return String.fromCharCode(bytes[this.pos]);
        },
        getChar: function() {
            var ch = this.lookChar();
            if (!ch)
                return ch;
            this.pos++;
            return ch;
        },
        putBack: function() {
            this.pos--;
        },
        skipChar: function() {
            this.pos++;
        },
        skip: function(n) {
            this.pos += n;
        },
        moveStart: function() {
            this.start = this.pos;
        },
        find: function(needle, limit, backwards) {
            var length = this.bytes.length;
            var pos = this.pos;
            var str = "";
            if (pos + limit > length)
                limit = length - pos;
            for (var n = 0; n < limit; ++n)
                str += this.getChar();
            this.pos = pos;
            var index = backwards ? str.lastIndexOf(needle) : str.indexOf(needle);
            if (index == -1)
                return false; /* not found */
            this.pos += index;
            return true; /* found */
        },
        asString: function() {
            var str = "";
            var ch;
            while (!!(ch = this.getChar()))
                str += ch;
            return str;
        },
        makeSubStream: function(pos, length) {
            return new Stream(new Uint8Array(this.bytes, pos, length));
        }
    };

    return constructor;
})();

var StringStream = (function() {
    function constructor(str) {
        var length = str.length;
        var bytes = new Uint8Array(length);
        for (var n = 0; n < length; ++n)
            bytes[n] = str.charCodeAt(n);
        Stream.call(this, bytes);
    }

    constructor.prototype = Stream.prototype;

    return constructor;
})();

var FlateStream = (function() {
    const codeMap = [
        16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15
    ];

    const lengthDecode = [
        [0,   3],
        [0,   4],
        [0,   5},
        [0,   6},
        [0,   7},
        [0,   8},
        [0,   9},
        [0,  10],
        [1,  11],
        [1,  13],
        [1,  15],
        [1,  17],
        [2,  19],
        [2,  23],
        [2,  27],
        [2,  31],
        [3,  35],
        [3,  43],
        [3,  51],
        [3,  59],
        [4,  67],
        [4,  83],
        [4,  99],
        [4, 115],
        [5, 131],
        [5, 163],
        [5, 195],
        [5, 227],
        [0, 258],
        [0, 258],
        [0, 258]
    ];

    const fixedLitCodeTabCodes = [
        [7, 0x0100],
        [8, 0x0050],
        [8, 0x0010],
        [8, 0x0118],
        [7, 0x0110],
        [8, 0x0070],
        [8, 0x0030],
        [9, 0x00c0],
        [7, 0x0108],
        [8, 0x0060],
        [8, 0x0020],
        [9, 0x00a0],
        [8, 0x0000],
        [8, 0x0080],
        [8, 0x0040],
        [9, 0x00e0],
        [7, 0x0104],
        [8, 0x0058],
        [8, 0x0018],
        [9, 0x0090],
        [7, 0x0114],
        [8, 0x0078],
        [8, 0x0038],
        [9, 0x00d0],
        [7, 0x010c],
        [8, 0x0068],
        [8, 0x0028],
        [9, 0x00b0],
        [8, 0x0008],
        [8, 0x0088],
        [8, 0x0048],
        [9, 0x00f0],
        [7, 0x0102],
        [8, 0x0054],
        [8, 0x0014],
        [8, 0x011c],
        [7, 0x0112],
        [8, 0x0074],
        [8, 0x0034],
        [9, 0x00c8],
        [7, 0x010a],
        [8, 0x0064],
        [8, 0x0024],
        [9, 0x00a8],
        [8, 0x0004],
        [8, 0x0084],
        [8, 0x0044],
        [9, 0x00e8],
        [7, 0x0106],
        [8, 0x005c],
        [8, 0x001c],
        [9, 0x0098],
        [7, 0x0116],
        [8, 0x007c],
        [8, 0x003c],
        [9, 0x00d8],
        [7, 0x010e],
        [8, 0x006c],
        [8, 0x002c],
        [9, 0x00b8],
        [8, 0x000c],
        [8, 0x008c],
        [8, 0x004c],
        [9, 0x00f8],
        [7, 0x0101],
        [8, 0x0052],
        [8, 0x0012],
        [8, 0x011a],
        [7, 0x0111],
        [8, 0x0072],
        [8, 0x0032],
        [9, 0x00c4],
        [7, 0x0109],
        [8, 0x0062],
        [8, 0x0022],
        [9, 0x00a4],
        [8, 0x0002],
        [8, 0x0082],
        [8, 0x0042],
        [9, 0x00e4],
        [7, 0x0105],
        [8, 0x005a],
        [8, 0x001a],
        [9, 0x0094],
        [7, 0x0115],
        [8, 0x007a],
        [8, 0x003a],
        [9, 0x00d4],
        [7, 0x010d],
        [8, 0x006a],
        [8, 0x002a],
        [9, 0x00b4],
        [8, 0x000a],
        [8, 0x008a],
        [8, 0x004a],
        [9, 0x00f4],
        [7, 0x0103],
        [8, 0x0056],
        [8, 0x0016],
        [8, 0x011e],
        [7, 0x0113],
        [8, 0x0076],
        [8, 0x0036],
        [9, 0x00cc],
        [7, 0x010b],
        [8, 0x0066],
        [8, 0x0026],
        [9, 0x00ac],
        [8, 0x0006],
        [8, 0x0086],
        [8, 0x0046],
        [9, 0x00ec],
        [7, 0x0107],
        [8, 0x005e],
        [8, 0x001e],
        [9, 0x009c],
        [7, 0x0117],
        [8, 0x007e],
        [8, 0x003e],
        [9, 0x00dc],
        [7, 0x010f],
        [8, 0x006e],
        [8, 0x002e],
        [9, 0x00bc],
        [8, 0x000e],
        [8, 0x008e],
        [8, 0x004e],
        [9, 0x00fc],
        [7, 0x0100],
        [8, 0x0051],
        [8, 0x0011],
        [8, 0x0119],
        [7, 0x0110],
        [8, 0x0071],
        [8, 0x0031],
        [9, 0x00c2],
        [7, 0x0108],
        [8, 0x0061],
        [8, 0x0021],
        [9, 0x00a2],
        [8, 0x0001],
        [8, 0x0081],
        [8, 0x0041],
        [9, 0x00e2],
        [7, 0x0104],
        [8, 0x0059],
        [8, 0x0019],
        [9, 0x0092],
        [7, 0x0114],
        [8, 0x0079],
        [8, 0x0039],
        [9, 0x00d2],
        [7, 0x010c],
        [8, 0x0069],
        [8, 0x0029],
        [9, 0x00b2],
        [8, 0x0009],
        [8, 0x0089],
        [8, 0x0049],
        [9, 0x00f2],
        [7, 0x0102],
        [8, 0x0055],
        [8, 0x0015],
        [8, 0x011d],
        [7, 0x0112],
        [8, 0x0075],
        [8, 0x0035],
        [9, 0x00ca],
        [7, 0x010a],
        [8, 0x0065],
        [8, 0x0025],
        [9, 0x00aa],
        [8, 0x0005],
        [8, 0x0085],
        [8, 0x0045],
        [9, 0x00ea],
        [7, 0x0106],
        [8, 0x005d],
        [8, 0x001d],
        [9, 0x009a],
        [7, 0x0116],
        [8, 0x007d],
        [8, 0x003d],
        [9, 0x00da],
        [7, 0x010e],
        [8, 0x006d],
        [8, 0x002d],
        [9, 0x00ba],
        [8, 0x000d],
        [8, 0x008d],
        [8, 0x004d],
        [9, 0x00fa],
        [7, 0x0101],
        [8, 0x0053],
        [8, 0x0013],
        [8, 0x011b],
        [7, 0x0111],
        [8, 0x0073],
        [8, 0x0033],
        [9, 0x00c6],
        [7, 0x0109],
        [8, 0x0063],
        [8, 0x0023],
        [9, 0x00a6],
        [8, 0x0003],
        [8, 0x0083],
        [8, 0x0043],
        [9, 0x00e6],
        [7, 0x0105],
        [8, 0x005b],
        [8, 0x001b],
        [9, 0x0096],
        [7, 0x0115],
        [8, 0x007b],
        [8, 0x003b],
        [9, 0x00d6],
        [7, 0x010d],
        [8, 0x006b],
        [8, 0x002b],
        [9, 0x00b6],
        [8, 0x000b],
        [8, 0x008b],
        [8, 0x004b],
        [9, 0x00f6],
        [7, 0x0103],
        [8, 0x0057],
        [8, 0x0017],
        [8, 0x011f],
        [7, 0x0113],
        [8, 0x0077],
        [8, 0x0037],
        [9, 0x00ce],
        [7, 0x010b],
        [8, 0x0067],
        [8, 0x0027],
        [9, 0x00ae],
        [8, 0x0007],
        [8, 0x0087],
        [8, 0x0047],
        [9, 0x00ee],
        [7, 0x0107],
        [8, 0x005f],
        [8, 0x001f],
        [9, 0x009e],
        [7, 0x0117],
        [8, 0x007f],
        [8, 0x003f],
        [9, 0x00de],
        [7, 0x010f],
        [8, 0x006f],
        [8, 0x002f],
        [9, 0x00be],
        [8, 0x000f],
        [8, 0x008f],
        [8, 0x004f],
        [9, 0x00fe],
        [7, 0x0100],
        [8, 0x0050],
        [8, 0x0010],
        [8, 0x0118],
        [7, 0x0110],
        [8, 0x0070],
        [8, 0x0030],
        [9, 0x00c1],
        [7, 0x0108],
        [8, 0x0060],
        [8, 0x0020],
        [9, 0x00a1],
        [8, 0x0000],
        [8, 0x0080],
        [8, 0x0040],
        [9, 0x00e1],
        [7, 0x0104],
        [8, 0x0058],
        [8, 0x0018],
        [9, 0x0091],
        [7, 0x0114],
        [8, 0x0078],
        [8, 0x0038],
        [9, 0x00d1],
        [7, 0x010c],
        [8, 0x0068],
        [8, 0x0028],
        [9, 0x00b1],
        [8, 0x0008],
        [8, 0x0088],
        [8, 0x0048],
        [9, 0x00f1],
        [7, 0x0102],
        [8, 0x0054],
        [8, 0x0014],
        [8, 0x011c],
        [7, 0x0112],
        [8, 0x0074],
        [8, 0x0034],
        [9, 0x00c9],
        [7, 0x010a],
        [8, 0x0064],
        [8, 0x0024],
        [9, 0x00a9],
        [8, 0x0004],
        [8, 0x0084],
        [8, 0x0044],
        [9, 0x00e9],
        [7, 0x0106],
        [8, 0x005c],
        [8, 0x001c],
        [9, 0x0099],
        [7, 0x0116],
        [8, 0x007c],
        [8, 0x003c],
        [9, 0x00d9],
        [7, 0x010e],
        [8, 0x006c],
        [8, 0x002c],
        [9, 0x00b9],
        [8, 0x000c],
        [8, 0x008c],
        [8, 0x004c],
        [9, 0x00f9],
        [7, 0x0101],
        [8, 0x0052],
        [8, 0x0012],
        [8, 0x011a],
        [7, 0x0111],
        [8, 0x0072],
        [8, 0x0032],
        [9, 0x00c5],
        [7, 0x0109],
        [8, 0x0062],
        [8, 0x0022],
        [9, 0x00a5],
        [8, 0x0002],
        [8, 0x0082],
        [8, 0x0042],
        [9, 0x00e5],
        [7, 0x0105],
        [8, 0x005a],
        [8, 0x001a],
        [9, 0x0095],
        [7, 0x0115],
        [8, 0x007a],
        [8, 0x003a],
        [9, 0x00d5],
        [7, 0x010d],
        [8, 0x006a],
        [8, 0x002a],
        [9, 0x00b5],
        [8, 0x000a],
        [8, 0x008a],
        [8, 0x004a],
        [9, 0x00f5],
        [7, 0x0103],
        [8, 0x0056],
        [8, 0x0016],
        [8, 0x011e],
        [7, 0x0113],
        [8, 0x0076],
        [8, 0x0036],
        [9, 0x00cd],
        [7, 0x010b],
        [8, 0x0066],
        [8, 0x0026],
        [9, 0x00ad],
        [8, 0x0006],
        [8, 0x0086],
        [8, 0x0046],
        [9, 0x00ed],
        [7, 0x0107],
        [8, 0x005e],
        [8, 0x001e],
        [9, 0x009d],
        [7, 0x0117],
        [8, 0x007e],
        [8, 0x003e],
        [9, 0x00dd],
        [7, 0x010f],
        [8, 0x006e],
        [8, 0x002e],
        [9, 0x00bd],
        [8, 0x000e],
        [8, 0x008e],
        [8, 0x004e],
        [9, 0x00fd],
        [7, 0x0100],
        [8, 0x0051],
        [8, 0x0011],
        [8, 0x0119],
        [7, 0x0110],
        [8, 0x0071],
        [8, 0x0031],
        [9, 0x00c3],
        [7, 0x0108],
        [8, 0x0061],
        [8, 0x0021],
        [9, 0x00a3],
        [8, 0x0001],
        [8, 0x0081],
        [8, 0x0041],
        [9, 0x00e3],
        [7, 0x0104],
        [8, 0x0059],
        [8, 0x0019],
        [9, 0x0093],
        [7, 0x0114],
        [8, 0x0079],
        [8, 0x0039],
        [9, 0x00d3],
        [7, 0x010c],
        [8, 0x0069],
        [8, 0x0029],
        [9, 0x00b3],
        [8, 0x0009],
        [8, 0x0089],
        [8, 0x0049],
        [9, 0x00f3],
        [7, 0x0102],
        [8, 0x0055],
        [8, 0x0015],
        [8, 0x011d],
        [7, 0x0112],
        [8, 0x0075],
        [8, 0x0035],
        [9, 0x00cb],
        [7, 0x010a],
        [8, 0x0065],
        [8, 0x0025],
        [9, 0x00ab],
        [8, 0x0005],
        [8, 0x0085],
        [8, 0x0045],
        [9, 0x00eb],
        [7, 0x0106],
        [8, 0x005d],
        [8, 0x001d],
        [9, 0x009b],
        [7, 0x0116],
        [8, 0x007d],
        [8, 0x003d],
        [9, 0x00db],
        [7, 0x010e],
        [8, 0x006d],
        [8, 0x002d],
        [9, 0x00bb],
        [8, 0x000d],
        [8, 0x008d],
        [8, 0x004d],
        [9, 0x00fb],
        [7, 0x0101],
        [8, 0x0053],
        [8, 0x0013],
        [8, 0x011b],
        [7, 0x0111],
        [8, 0x0073],
        [8, 0x0033],
        [9, 0x00c7],
        [7, 0x0109],
        [8, 0x0063],
        [8, 0x0023],
        [9, 0x00a7],
        [8, 0x0003],
        [8, 0x0083],
        [8, 0x0043],
        [9, 0x00e7],
        [7, 0x0105],
        [8, 0x005b],
        [8, 0x001b],
        [9, 0x0097],
        [7, 0x0115],
        [8, 0x007b],
        [8, 0x003b],
        [9, 0x00d7],
        [7, 0x010d],
        [8, 0x006b],
        [8, 0x002b],
        [9, 0x00b7],
        [8, 0x000b],
        [8, 0x008b],
        [8, 0x004b],
        [9, 0x00f7],
        [7, 0x0103],
        [8, 0x0057],
        [8, 0x0017],
        [8, 0x011f],
        [7, 0x0113],
        [8, 0x0077],
        [8, 0x0037],
        [9, 0x00cf],
        [7, 0x010b],
        [8, 0x0067],
        [8, 0x0027],
        [9, 0x00af],
        [8, 0x0007],
        [8, 0x0087],
        [8, 0x0047],
        [9, 0x00ef],
        [7, 0x0107],
        [8, 0x005f],
        [8, 0x001f],
        [9, 0x009f],
        [7, 0x0117],
        [8, 0x007f],
        [8, 0x003f],
        [9, 0x00df],
        [7, 0x010f],
        [8, 0x006f],
        [8, 0x002f],
        [9, 0x00bf],
        [8, 0x000f],
        [8, 0x008f],
        [8, 0x004f],
        [9, 0x00ff]
    ];

    const fixedLitCodeTab = [
        fixedLitCodeTabCodes, 9
    ];
    
    const fixedDistCodeTabCodes = [
        [5, 0x0000],
        [5, 0x0010],
        [5, 0x0008],
        [5, 0x0018],
        [5, 0x0004],
        [5, 0x0014],
        [5, 0x000c],
        [5, 0x001c],
        [5, 0x0002],
        [5, 0x0012],
        [5, 0x000a],
        [5, 0x001a],
        [5, 0x0006],
        [5, 0x0016],
        [5, 0x000e],
        [0, 0x0000],
        [5, 0x0001],
        [5, 0x0011],
        [5, 0x0009],
        [5, 0x0019],
        [5, 0x0005],
        [5, 0x0015],
        [5, 0x000d],
        [5, 0x001d],
        [5, 0x0003],
        [5, 0x0013],
        [5, 0x000b],
        [5, 0x001b],
        [5, 0x0007],
        [5, 0x0017],
        [5, 0x000f],
        [0, 0x0000]
    ];

    const fixedDistCodeTab = [
        fixedDistCodeTabCodes, 5
    ];

    function constructor() {
        this.codeSize = 0;
    }

    constructor.prototype = {
        getBits: function(bits) {
            var codeSize = this.codeSize;
        }
    };

    return constructor;
})();

var DecryptStream = (function() {
{'fraction_non_alphanumeric': 0.1691274452321305, 'fraction_numerical': 0.1668354565321678, 'mean_word_length': 1.1872231289344837, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1278957', 'n_tokens_mistral': 9296, 'n_tokens_neox': 7500, 'n_words': 1630}