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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T20:55:49+00:00 2026-06-14T20:55:49+00:00

I created a encrypted file from a text file in python with beefish. beefish

  • 0

I created a encrypted file from a text file in python with beefish.
beefish uses pycrypto.

so my source text file is 33742 bytes and the encrypted version is 33752.
thats ok so far but …

when I compress the test.enc (encrypted test file) with tar -czvf the final file is 33989 bytes. Why does the compression not work when the source file is encrypted?

So far the only option then seems to compress it first and then encrypt it cause then the file stays that small.

  • 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-14T20:55:50+00:00Added an answer on June 14, 2026 at 8:55 pm

    Compression works by identifying patterns in the data. Since you can’t identify patterns in encrypted data (that’s the whole point), you can’t compress it.

    For a perfect encryption algorithm that produced a 33,742 byte output, ideally all you would be able to determine about the decrypted original data is that it can fit in 33,742 bytes, but no more than that. If you could compress it to, say, 31,400 bytes, then you would immediately know the input data was not, say, 32,000 bytes of random data since random data is patternless and thus incompressible. That would indicate a failure on the part of the encryption scheme. It’s nobody’s business whether the decrypted data is random or not.

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

Sidebar

Related Questions

I have created a .net application that is currently using a encrypted text file
If an error occurrs, a log file,in pure text format will be created to
The basic idea is that: I'm downloading encrypted image file from internet and start
My client wants all user data encrypted, so I've created a before_save and after_find
Created .NET WCF service, tested it - works. Generated schemas from Data and service
I created a python server on port 8000 using python -m SimpleHTTPServer . When
I'm trying to encrypt a text file using Perl and then decrypt it using
My application stores user interactions in an encrypted file that it gathers during what
Let's say I have a text file contains my data. data : ab bc
I am having a text file that contains users name.I want to extract users

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.