base64 is the opposite of compressed. Does it actually apply compression before base64-encoding? Doesn't really look like it by watching the URL.
Reassuringly:
function serialize(value) {
if (value === '') { return ''; }
const data = new TextEncoder().encode(value);
const compressed = pako.deflate(data, { level: 9 });
return Base64.fromUint8Array(compressed, true);
}