Update to fflate (#448)

* Update to fflate

* Update docs, bundler config
This commit is contained in:
101arrowz
2026-04-01 12:00:00 +08:00
committed by GitHub
parent 79623734a1
commit 30026bb8f5
8 changed files with 14 additions and 36 deletions

View File

@@ -1,4 +1,4 @@
import { deflate } from 'pako/dist/pako_deflate';
import { strFromU8, strToU8, zlibSync } from 'fflate';
import { PackFn, MARK, eventWithTimeAndPacker } from './base';
export const pack: PackFn = (event) => {
@@ -6,5 +6,5 @@ export const pack: PackFn = (event) => {
...event,
v: MARK,
};
return deflate(JSON.stringify(_e), { to: 'string' });
return strFromU8(zlibSync(strToU8(JSON.stringify(_e))), true);
};