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 6570505
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T14:45:53+00:00 2026-05-25T14:45:53+00:00

I have Base64 encoded data from an experiment. So what I am trying to

  • 0

I have Base64 encoded data from an experiment. So what I am trying to do in stepwise is:

  • Retrieve bytes from base64 encoding (Decode it)
  • Convert bytes to little-endian
  • Decompress bytes from (zlib)
  • Convert byte array to float array

Example:

Dn3LQ3np4kOyxQJE20kDRBRuFkScZB5ENxEzRFa+O0THMz9EOQRCRFC1QkRYeUNEwXJJROfbSUScvE5EVDtVRK5PV0TLUWNE481lRHX7ZkSBBWpE9FVyRIFdeESkoHhEnid8RI1nfUSy4YBE/C2CRGKQg0RcR4RE54uEROUAhUTBWodErKyMRNsVkkRvUpJEukWURO58lkSqRZ1E2VauRPBTwEQf9cVE9BnKRA==

What I have tried so far

import os
import base64
import struct

s = 'Dn3LQ3np4kOyxQJE20kDRBRuFkScZB5ENxEzRFa+O0THMz9EOQRCRFC1QkRYeUNEwXJJROfbSUScvE5EVDtVRK5PV0TLUWNE481lRHX7ZkSBBWpE9FVyRIFdeESkoHhEnid8RI1nfUSy4YBE/C2CRGKQg0RcR4RE54uEROUAhUTBWodErKyMRNsVkkRvUpJEukWURO58lkSqRZ1E2VauRPBTwEQf9cVE9BnKRA=='
decode=base64.decodestring(s)

tmp_size=len(decode)/4

Now I am trying to convert these byte to little endian from here.

I want to do the next operation in Python.

I am trying to figure it out myself but, it is taking too much time.

Thanks!

  • 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-05-25T14:45:54+00:00Added an answer on May 25, 2026 at 2:45 pm

    It appears your data isn’t actually compressed. Read the data as floats either in a loop using struct.unpack_from() or as one big structure using struct.unpack().

    import base64
    import struct
    
    encoded = 'Dn3LQ3np ... 9BnKRA=='
    
    # decode the string
    data = base64.standard_b64decode(encoded)
    
    # ensure that there's enough data for 32-bit floats
    assert len(data) % 4 == 0
    
    # determine how many floats there are
    count = len(data) // 4
    
    # unpack the data as floats
    result = struct.unpack('<{0}f'.format(count), # one big structure of `count` floats
                           data)                  # results returned as a tuple
    

    If the data is compressed, decompress it.

    import zlib
    
    decompressed = zlib.decompress(data)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to download Base64 Encoded data from Server using HttpUrlConnection. And then decode
I have an function which decodes the encoded base64 data in binary data but
I've been trying to Base64 encode image data from the user (in this case
I have been working with base64 encoding. I have successfully encoded images to NSString
I have got to convert a PDF to a Base64 Encoded and write it
I have some problem for decoding image data from base 64 encoded string. I
I have a .NET string which is Base64 encoded representation of an array of
Can Unicode characters be encoded and decoded with Base64 ? I have attempted to
I have a binary that I want to convert to standard MIME-compliant base64 string.
I have problem with this code: file = tempfile.TemporaryFile(mode='wrb') file.write(base64.b64decode(data)) file.flush() os.fsync(file) # file.seek(0)

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.