import { gzip , ungzip } from "pako" ; param text returns function compress ( text ) { return gzip ( text , { level : 9 , to : "string" } ) ; } param text returns function decompress ( text ) { return ungzip ( text , { to : "string" } ) ; } export function getCompressionResources ( ) { return { "compression/v1/compressText" : compress , "compression/v1/decompressText" : decompress } ; }