Packer (#172)
* introduce pako and add general packer interface * add tests for packer * use function API instead of class API for better tree shaking support * refcatoring the rollup bundle config
This commit is contained in:
10
src/packer/base.ts
Normal file
10
src/packer/base.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { eventWithTime } from '../types';
|
||||
|
||||
export type PackFn = (event: eventWithTime) => string;
|
||||
export type UnpackFn = (raw: string) => eventWithTime;
|
||||
|
||||
export type eventWithTimeAndPacker = eventWithTime & {
|
||||
v: string;
|
||||
};
|
||||
|
||||
export const MARK = 'v1';
|
||||
Reference in New Issue
Block a user