Problems decoding base64-encoded GZipped string

English support forum

Moderators: white, sheep, Hacker, Stefan2

Post Reply
Junior Member
Junior Member
Posts: 2
Joined: 2018-06-08, 10:54 UTC

Problems decoding base64-encoded GZipped string

Post by *RobitZee » 2018-06-08, 11:24 UTC

Hi all

This is my first post here, so please forgive me if it doesn't belong here.. 8)

So, my issue is this:
I have a folder that contains files which is basically a series of ASCII characters representing a base64-encoded GZipped XML string.
I would expect TC to be able to decode the file to the extend where the resulting output file would be the GZip bytes, but this doesn't seem to work :?
No matter if I change the extension from gzb to .b64 - the result is the same: TC throws a dialog that tells me that nothing was decoded.

I'm normally only running the stable releases, but I verified this behaviour with the latest 9.2B6 version too..

Am I going at this the wrong way - or doesn't TC support this?

The contents of one of these gzb files are posted here for testing purposes:

Code: Select all

Using the online decompression page on the txtwizard site it seems to decompress correctly into the right xml stream:

Code: Select all

<?xml version="1.0" encoding="utf-8" ?>
    <Manufacturer>Allen Bradley</Manufacturer>
    <SerialNo />
    <IndexNo />
    <LastCalibration />
    <NextCalibration />
    <CalibrationStatus />
    <CalibrationReport />
    <CalibrationHierarchy />
    <InstrumentResponsible />
Can anyone verify this behaviour and potentially enlighten me :D

Best Regards

User avatar
Power Member
Power Member
Posts: 2183
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Post by *Stefan2 » 2018-06-08, 11:34 UTC

Hi and welcome!

Excellent report done.

- - -

If I utilize Encode to b64, I get smtg like that

Code: Select all

MIME-Version: 1.0
Content-Type: application/octet-stream; name="BEGINCPP.ZIP"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="BEGINCPP.ZIP"


So maybe your files missing that header?

If I remove that header lines, I get the same message as you.


Junior Member
Junior Member
Posts: 2
Joined: 2018-06-08, 10:54 UTC

Post by *RobitZee » 2018-06-08, 12:09 UTC

Perfect - when I attach a similar header, then it works..
Who would've thought :D

Although I wish TC would support decoding a base64 encoded file without a header :roll:

Thanks for the tip anyway - and have a nice weekend

Post Reply