export function Compress(data):ArrayBuffer{
// 数据压缩
const compressedData = pako.gzip(JSON.stringify(data));
return toArrayBuffer(compressedData);
}
function toArrayBuffer(byteArray: Uint8Array): ArrayBuffer {
const arrayBuffer = new ArrayBuffer(byteArray.length);
new Uint8Array(arrayBuffer).set(byteArray);
return arrayBuffer;
}
let strdata = Compress(jsonStr);
var blob = new Blob([strdata]);
let formData = new FormData()
formData.append('a', blob)