12.4 概念模块功能完善

This commit is contained in:
尚政杰
2025-12-04 17:41:33 +08:00
parent 4e64455b9b
commit 44842120da
5090 changed files with 9843 additions and 146120 deletions

View File

@@ -1,18 +0,0 @@
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 };