11.26 修改K线图样式
This commit is contained in:
18
node_modules/@posthog/core/dist/gzip.mjs
generated
vendored
Normal file
18
node_modules/@posthog/core/dist/gzip.mjs
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
function isGzipSupported() {
|
||||
return 'CompressionStream' in globalThis;
|
||||
}
|
||||
async function gzipCompress(input, isDebug = true) {
|
||||
try {
|
||||
const dataStream = new Blob([
|
||||
input
|
||||
], {
|
||||
type: 'text/plain'
|
||||
}).stream();
|
||||
const compressedStream = dataStream.pipeThrough(new CompressionStream('gzip'));
|
||||
return await new Response(compressedStream).blob();
|
||||
} catch (error) {
|
||||
if (isDebug) console.error('Failed to gzip compress data', error);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
export { gzipCompress, isGzipSupported };
|
||||
Reference in New Issue
Block a user