import JSZip from 'jszip';
export function readFileAsArrayBuffer(file) {
    var fileReader = new FileReader();
    return new Promise(function (resolve, reject) {
        fileReader.onload = function (evt) {
            var arrayBuffer = fileReader.result;
            resolve(arrayBuffer);
        };
        fileReader.readAsArrayBuffer(file);
    });
}
export function readFileAsText(file) {
    var fileReader = new FileReader();
    return new Promise(function (resolve, reject) {
        fileReader.onload = function (evt) {
            var str = fileReader.result;
            resolve(str);
        };
        fileReader.readAsText(file, 'utf-8');
    });
}
export function createZip() {
    return new JSZip();
}
