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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T06:20:53+00:00 2026-05-16T06:20:53+00:00

I have the following problem: I have a local .zip file and a .zip

  • 0

I have the following problem: I have a local .zip file and a .zip file located on a server. I need to check if the .zip file on the server is different from the local one; if they are not I need to pull the new one from the server. My question is how do I compare them without downloading the file from the server and comparing them locally?

I could create an MD5 hash for the zip file on the server when creating the .zip file and then compare it with the MD5 of my local .zip file, but is there a simpler way?

  • 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-16T06:20:53+00:00Added an answer on May 16, 2026 at 6:20 am

    Short answer: You can’t.

    Long answer: To compare with the zip file on the server, someone has to read that file. Either you can do that locally, which would involve pulling it, or you can ask the server to do it for you. Can you run code on the server?

    Edit

    If you can run Python on the server, why not hash the file and compare hashes?

    import hashlib
    with open( <path-to-file>, "rb" ) as theFile:
        m = hashlib.md5( )
        for line in theFile:
            m.update( line )
    with open( <path-to-hashfile>, "wb" ) as theFile:
        theFile.write( m.digest( ) )
    

    and then compare the contents of hashfile with a locally-generated hash?

    Another edit

    You asked for a simpler way. Think about this in an abstract way for a moment:

    • You don’t want to download the entire zip file.
    • Hence, you can’t process the entire file locally (because that would involve reading all of it from the server, which is equivalent to downloading it!).
    • Hence, you need to do some processing on the server. Specifically, you want to come up with some small amount of data that ‘encodes’ the file, so that you can fetch this small amount of data without fetching the whole file.
    • But this is a hash!

    Therefore, you need to do some sort of hashing. Given that, I think the above is pretty simple.

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

Sidebar

Related Questions

I have the following problem: I have a form in site/banen (currently local running
I have the following problem using template instantiation [*]. file foo.h class Foo {
I have the following problem: We need to find the next august. I other
i have a strange problem with truezip. i run the following code: TFile.setDefaultArchiveDetector(new TArchiveDetector(zip));
I have the following Problem: I create a custom control which inherits from an
I have been experiencing the following problem when updating a local repository with PULL
I have following problem: I have built a tabbar application with 4 tabs. I
I have following problem, Code: String a=Yeahh, I have no a idea what's happening
I have the following problem: I have an HTML textbox ( <input type=text> )
I have the following problem using subversion: I'm currently working on the trunk of

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.