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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T03:19:12+00:00 2026-05-15T03:19:12+00:00

Well, I’m trying to gzdeflate my code to perform some very low level encryption

  • 0

Well, I’m trying to gzdeflate my code to perform some very low level encryption for distribution, to use with eval(gzinflate('deflated_code'));

However whenever I try to inflate the deflated string, it outputs an error.

For example:

echo(gzdeflate('test')); outputs +I-.�

But when I try to echo(gzinflate('+I-.�')); it only outputs Warning: gzinflate() [function.gzinflate]: data error

Is there something I’m missing? Why is it outputting this error rather than test?

  • 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-15T03:19:13+00:00Added an answer on May 15, 2026 at 3:19 am

    The output of

    $s = gzdeflate('test');
    for ($i=0; $i<strlen($s); $i++) {
      printf("%02X ", ord($s[$i]));
    }
    

    is 2B 49 2D 2E 01 00. The last two bytes 01 00 are in this case the tricky part.
    You used echo to print the result “string”. What was the output medium?
    When I copy the string +I-.� via ultraedit into the script the output is 2B 49 2D 2E 3F. A different result and the cause for gzinflate() to bail out.

    If you really have to display the data in a medium that cannot show all possible “characters” in the result of gzdeflate() you have to encode the result in a way that either those unprintable characters are avoided or encoded in a suitable form for that medium, e.g. via base64_encode().

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

Sidebar

Related Questions

Well, I have a application which somehow requires some system resources, but how do
well, I am trying to include a header file in my project, while the
Well, I was trying to fix this program, and I keep getting the errors
Well im here because i have a problem. i have code that was created
well. i was use Reactive Extensions (Rx) package async Request,Before you can start writing
well I'm trying to create a great playlist of music, only using a sigle
Well, having decided to get to know some of the basic functions in R
Well, I have GridView with editable field like 'TemplateField' with DropDownList. My code: <Columns>
Well, this must be a silly one. Here below is a can-not-be-simpler code in
Well I have a view of this type of hierarchy Main View (having some

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.