-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Hi Mark,
I've tried to compress and decompress a Digital Link URI with a custom path and I had a problem.
Here is what I'm doing :
const input = 'https://example.com/some/other/path/info/01/09780345418913/21/12345';
const compress = Utils.compressWebUri(input);
const uncompress = Utils.decompressWebUri(compress);
expect(input).to.equal(uncompress);But uncompress equals https://example.com/01/09780345418913/21/12345
Here are my compress and decompress functions :
const decompressWebUri = (uri, useShortText = false) =>
toolkit.decompressGS1DigitalLink(uri, useShortText, getUriStem(uri));
const compressWebUri = (uri, useOptimisations = true, compressOtherKeyValuePairs = true) => {
const uncompressedPrimary = false;
const useShortText = false;
return toolkit.compressGS1DigitalLink(
uri,
useShortText, // Not used
getUriStem(uri),
uncompressedPrimary, // Not used
useOptimisations,
compressOtherKeyValuePairs,
);
};Do you know where the issue comes from?
Thanks
Metadata
Metadata
Assignees
Labels
No labels