in packages/azure-kusto-ingest/src/fileDescriptor.browser.ts [30:42]
async prepare(ingestionProperties?: IngestionPropertiesInput): Promise<Blob> {
const shouldNotCompressByFormat = !shouldCompressFileByFormat(ingestionProperties);
if (!this.zipped && !this.shouldNotCompress && !shouldNotCompressByFormat) {
try {
const gzipped = pako.gzip(await this.file.arrayBuffer());
return new Blob([gzipped]);
} catch (e) {
// Ignore - return the file itself
}
}
return this.file;
}