Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8523197
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T07:20:24+00:00 2026-06-11T07:20:24+00:00

I have a string saved to a database that is encoded by Actionscript by

  • 0

I have a string saved to a database that is encoded by Actionscript by base64ing it and then zlib compressing it.

An example string is this: “eNrj4mZkrShgWdHBx1mUmJfNosQIACUhBCI=”

If I unzip and un base64 this via Actionscript, I get what I expect:

{“xp”: 656398, “rank”: 34}

But, I need to be able to also read this server-side. For now I’m using Python but I’d be open to a working PHP solution or similar.

So far in Python I have tried this:

import base64
import zlib

s = 'eNrj4mZkrShgWdHBx1mUmJfNosQIACUhBCI='

print s.decode("base64").decode("zlib")

It looks like Actionscript adds some extra bits into the header, but my Python is not strong enough to defeat this 🙂 Any help would be much appreciated!

EDIT: Actionscript first takes an AS Object and converts it to a ByteArray, before zlib compressing it and base64ing it. It looks like this is what is generating the extra header/mangled data info.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T07:20:25+00:00Added an answer on June 11, 2026 at 7:20 am

    Flash could be mangling this, but you should share an example from Actionscript that creates and checks this data.

    If you’re using a 3rd party library, it might be using an alternate characterset than Python is expecting.

    if you’re using the official library, it seems that Actionscript implements UTF8 and ascii differently. ( there are different methods here – http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/utils/Base64Encoder.html)

    it’s much easier to just see the actionscript and note if there’s an issue with the library or your code, than try to reverse engineer this.

    I think it also might be worth trying to bugfix this in reverse…

    import base64
    import zlib
    
    flash =  "eNrj4mZkrShgWdHBx1mUmJfNosQIACUhBCI="
    
    original = '{"xp": 656398, "rank": 34}'
    encoded = original.encode('zlib').encode('base64')
    decoded = encoded.decode('base64').decode('zlib')
    print original
    print encoded
    print decoded
    

    Can I also ask why you’re even doing this ?

    1- unless your packets are much bigger, you’re not going to be saving much bandwidth. in fact, compression on small payloads can actually increase the size.

    2- assuming this is web based, you should be able to have the server do this on the fly.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an xml string saved in a legacy database that I'm attempting to
I have this strings saved in my mysql database in format like: /uploads/attachments/18/105/WordPress_3_Cookbook.pdf Now,
I have string that look like Array that fetched from other webservice like this
I have string that displays UTF-8 encoded characters, and I want to convert it
I have a mysql database that is UTF8 encoded. However, due to some previous
I have the string Mühle saved as Mühle in a utf8 database. I want
I have a string like this: 16:00 and I want it to be saved
I have a json string saved in my db. When i retrieve it from
So i have this code: foreach (string xmlfilelisted in xmlFileList) { resultXml.Root.Add(XDocument.Load(xmlfilelisted).Root.Elements()); resultXml.Save(filepath); }
I have string as abvd.qweqw.sdfs.a=aqwrwewrwerrew . I need to parse this string and get

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.