This forum uses cookies. Click X button to hide this message. What is stored? / Privacy
Total Commander Forum Index Total Commander
Forum - Public Discussion and Support
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Problems decoding base64-encoded GZipped string

 
Post new topic   Reply to topic    Total Commander Forum Index -> Total Commander (English) Printable version
View previous topic :: View next topic  
Author Message
RobitZee
Junior Member
Junior Member


Joined: 08 Jun 2018
Posts: 2

PostPosted: Fri Jun 08, 2018 5:24 am    Post subject: Problems decoding base64-encoded GZipped string Reply with quote

Hi all

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

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 Confused
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:
H4sIAAAAAAAEAO29B2AcSZYlJi9tynt/SvVK1+B0oQiAYBMk2JBAEOzBiM3mkuwdaUcjKasqgcplVmVdZhZAzO2dvPfee++999577733ujudTif33/8/XGZkAWz2zkrayZ4hgKrIHz9+fB8/Ih7/Hu8WZXqZ101RLT/7aHe881GaL6fVrFhefPbRuj3fPvgo/T2OfuPk8dmyaev1Il+2T7M2e5239GGadj7mz4JPT3/RuljhlxfV0e7u7uO78a/0vS+y5fo8m7brOq+PjssyX6ZP6mxW5teP7wbfafs316v86KRatnVVPq8uineP7/JH+vXrvC6y8kWV3nWIzfJ3/gfPs6Y9ycpiUmctkcB98SJ/F//C+/B1m7XrJvrVq3xV1W30q28XeZ3V0/m1+/ZN3gTkuH9/9979ezSYzuc98r7Km1W1bIpJmSs0n8I6Jd2PMHn/D114IQX5AQAA

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

Code:
<?xml version="1.0" encoding="utf-8" ?>
<InstrumentDataSet>
  <InstrumentData>
    <InstrumentEquipmentNo>111</InstrumentEquipmentNo>
    <Manufacturer>Allen Bradley</Manufacturer>
    <Type>ControlLogix</Type>
    <SerialNo />
    <IndexNo />
    <LastCalibration />
    <NextCalibration />
    <CalibrationStatus />
    <CalibrationReport />
    <CalibrationHierarchy />
    <TestEquipmentNo>551353</TestEquipmentNo>
    <InstrumentResponsible />
  </InstrumentData>
</InstrumentDataSet>


Can anyone verify this behaviour and potentially enlighten me Very Happy

Best Regards
RobitZee
Back to top
View user's profile Send private message Send e-mail
Stefan2
Power Member
Power Member


Joined: 13 Sep 2007
Posts: 1928
Location: Europa

PostPosted: Fri Jun 08, 2018 5:34 am    Post subject: Reply with quote

Hi and welcome!

Excellent report done.

- - -

If I utilize Encode to b64, I get smtg like that
Code:
MIME-Version: 1.0
Content-Type: application/octet-stream; name="BEGINCPP.ZIP"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="BEGINCPP.ZIP"

UEsDBBQAAgAIAKsd/RQHBamdvwUAABQYAAAEAAAAIzEuQ61YTW
...
....
......
LS0tLS0tLS0tLS0tLS0tLS0tLS0tLQ==




So maybe your files missing that header?

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



 
_________________
The destination is one thing. Getting there is everything.
Back to top
View user's profile Send private message
RobitZee
Junior Member
Junior Member


Joined: 08 Jun 2018
Posts: 2

PostPosted: Fri Jun 08, 2018 6:09 am    Post subject: Reply with quote

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

Although I wish TC would support decoding a base64 encoded file without a header Rolling Eyes

Thanks for the tip anyway - and have a nice weekend
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Total Commander Forum Index -> Total Commander (English) All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Imprint/Impressum: This site is maintained by Ghisler Software GmbH
Privacy Policy | Datenschutzerklärung | Politique de Confidentialité

Using phpBB © phpBB Group