Giter VIP home page Giter VIP logo

bigdiffer's Introduction

PURPOSE:

Need to compute a reasonably-sized delta between two 10GB tarballs without requiring 2TB of memory?  This will do the job in a brutal, ugly, effective manner.


BUILD:


gcc -o chunker chunker.c

Everything else is in Python.  You'll need the sqlite module.


USAGE:

bigdiffer.sh amalgamates all the utilities into one callable so that you can just use it.  Be aware that it will make a mess of your disk and memory depending on how big the files are, especially if you abort it early.

QUESTIONS:

Why aren't I using a rolling hash?

I tried it.  I couldn't get consistent results.  Because of the vast tracts of nulls in tar files that have lots of little files I
was getting things like good chunk sizes for the first half of the file, and then the second half of the file as a single chunk.
So I made it use the vast tracts of nulls as break points and called it a day.  It works great on tar files.  It works ok on other things.
It's modular enough that you can easily substitute your own chunker if a different algorithm will work better for the data in question.

Doesn't this use a lot more memory than it needs to?

Yep.  If you're actually using it and it's actually a problem for you, file a bug report and I'll actually fix it.  
Otherwise, it works for what I need it for.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.