"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var ArrayHelper = /** @class */ (function () {
    function ArrayHelper() {
    }
    ArrayHelper.concat = function () {
        var args = [];
        for (var _i = 0; _i < arguments.length; _i++) {
            args[_i] = arguments[_i];
        }
        var totalSize = args.reduce(function (size, value) { return size + value.length; }, 0);
        var result = new Uint8Array(totalSize);
        var offset = 0;
        args.forEach(function (value) {
            result.set(value, offset);
            offset += value.length;
        });
        return result;
    };
    /**
     * Create chunk from an array
     * @param input data to split
     * @param chunkSize chunk size
     */
    ArrayHelper.chunk = function (input, chunkSize) {
        return Array.from(Array(Math.ceil(input.length / chunkSize)), function (_, i) { return input.slice(i * chunkSize, i * chunkSize + chunkSize); });
    };
    return ArrayHelper;
}());
exports.ArrayHelper = ArrayHelper;
