/*
 * SDK Pullenti Unitext, version 4.33, fabruary 2026. Copyright (c) 2013-2026, Pullenti. All rights reserved. 
 * Non-Commercial Freeware and Commercial Software. 
 * This class is generated using the converter UniSharping (www.unisharping.ru) from Pullenti C# project. 
 * The latest version of the code is available on the site www.pullenti.ru
 */

const Utils = require("./../../../unisharp/Utils");

// This class contains constants used for deflation.
class DeflaterConstants {
    
    static static_constructor() {
        DeflaterConstants.DEBUGGING = false;
        DeflaterConstants.STORED_BLOCK = 0;
        DeflaterConstants.STATIC_TREES = 1;
        DeflaterConstants.DYN_TREES = 2;
        DeflaterConstants.PRESET_DICT = 0x20;
        DeflaterConstants.DEFAULT_MEM_LEVEL = 8;
        DeflaterConstants.MAX_MATCH = 258;
        DeflaterConstants.MIN_MATCH = 3;
        DeflaterConstants.MAX_WBITS = 15;
        DeflaterConstants.WSIZE = 1 << DeflaterConstants.MAX_WBITS;
        DeflaterConstants.WMASK = DeflaterConstants.WSIZE - 1;
        DeflaterConstants.HASH_BITS = DeflaterConstants.DEFAULT_MEM_LEVEL + 7;
        DeflaterConstants.HASH_SIZE = 1 << DeflaterConstants.HASH_BITS;
        DeflaterConstants.HASH_MASK = DeflaterConstants.HASH_SIZE - 1;
        DeflaterConstants.HASH_SHIFT = Utils.intDiv(((DeflaterConstants.HASH_BITS + DeflaterConstants.MIN_MATCH) - 1), DeflaterConstants.MIN_MATCH);
        DeflaterConstants.MIN_LOOKAHEAD = DeflaterConstants.MAX_MATCH + DeflaterConstants.MIN_MATCH + 1;
        DeflaterConstants.MAX_DIST = DeflaterConstants.WSIZE - DeflaterConstants.MIN_LOOKAHEAD;
        DeflaterConstants.PENDING_BUF_SIZE = 1 << ((DeflaterConstants.DEFAULT_MEM_LEVEL + 8));
        DeflaterConstants.MAX_BLOCK_SIZE = Math.min(65535, DeflaterConstants.PENDING_BUF_SIZE - 5);
        DeflaterConstants.DEFLATE_STORED = 0;
        DeflaterConstants.DEFLATE_FAST = 1;
        DeflaterConstants.DEFLATE_SLOW = 2;
        DeflaterConstants.GOOD_LENGTH = new Int32Array([0, 4, 4, 4, 4, 8, 8, 8, 32, 32]);
        DeflaterConstants.MAX_LAZY = new Int32Array([0, 4, 5, 6, 4, 16, 16, 32, 128, 258]);
        DeflaterConstants.NICE_LENGTH = new Int32Array([0, 8, 16, 32, 16, 32, 128, 128, 258, 258]);
        DeflaterConstants.MAX_CHAIN = new Int32Array([0, 4, 8, 32, 16, 32, 128, 256, 1024, 4096]);
        DeflaterConstants.COMPR_FUNC = new Int32Array([0, 1, 1, 1, 1, 2, 2, 2, 2, 2]);
    }
}


DeflaterConstants.static_constructor();

module.exports = DeflaterConstants