Solved

Error at AttributeDecompressor

  • 15 December 2023
  • 3 replies
  • 9 views

Hi, I have compress a text with AttributeCompressor and stored it in an XML file. The text should be a password, so I don't want to store it as plain text. Then, I read the XML file and try to decompress the password with AttrributeDecompressor. But I only get this:

2023-12-15 14:31:40|   0.6|  0.0|ERROR |@CompressAttributes: The 'Compressed-table.Compressed.password' attribute could not be decompressed

By the moment, I'm only compressing, not enconding. But I cannot make it work.

I'm using FME Desktop 2022. I'm attaching both workbenches, (compress and decompress), the xml written by the first and readed by the second, and the logs of my execution.

Thank you for your help.

Best regards.

icon

Best answer by saraatsafe 2 January 2024, 20:03

View original

3 replies

Userlevel 2
Badge +6

Hi @rscsevilla​, I've filed this as an issue and included your .zip for our developers to take a closer look (internal reference: FMEENGINE-81347). I'll post any updates here. Please let me know if you have any other questions about this!

Userlevel 2
Badge +6

Hi @rscsevilla​, I've filed this as an issue and included your .zip for our developers to take a closer look (internal reference: FMEENGINE-81347). I'll post any updates here. Please let me know if you have any other questions about this!

Hi @rscsevilla​, I have an update on this issue: this doesn't seem to be a bug. 

Your input value gets compressed into a binary blob via the AttributeCompressor, and when this is written to XML, it's converted to a hexadecimal string value. When the XML value is read back in, it becomes a UTF-16 encoded string value which does not match the value of the binary blob and therefore causes the AttributeDecompressor to fail. 

 

Normally, you can get around this by converting the hexadecimal string back to a binary blob using a BinaryDecoder, however there seems to be a bug with with the BinaryDecoder which has been filed (internal reference: FMEENGINE-81399). 

 

You can instead use an AttributeEncoder as a workaround for the bug, followed by the BinaryDecoder. Please see the attached workspace for reference. 

I hope this helps and please let me know if you have any other questions! 

Ok, thank you. Now it's clear for me how it works. Thank you very much for your help.

Reply