Skip to content

Commit efd3854

Browse files
committed
compression helpers
1 parent 9f58041 commit efd3854

File tree

2 files changed

+9
-16
lines changed

2 files changed

+9
-16
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import pako from "pako";
2+
3+
export function compress(data: string): Uint8Array {
4+
return pako.deflate(data);
5+
}
6+
7+
export function decompress(data: Uint8Array) {
8+
return pako.inflate(data, { to: "string" });
9+
}

src/hooks/useCompression.ts

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)