title: Git and binary data, best storage method
body: <p>Im in the unfortunate situation of having to store some binary files in git,</p>
  
  <p>However I can choose how the data is stored on disk - in Git (in our own format which only the build system needs to read).</p>
  
  <p>I'd like to avoid talking specifics too much, since I dont think its so important - but to give some context these are many icon files, but the same question would apply to many small sound-files or 3d-models too.</p>
  
  <p>converting these files into one large image will be a build step, so the images can be stored however we like in git.</p>
  
  <ul>
  <li>Binary compressed (eg, PNG (image), FLAC (sound))</li>
  <li>Binary uncompressed (eg, PPM (image), Uncompressed-WAV (sound))</li>
  <li>ASCII representation of binary data (eg, mime encoding, XPM (image))</li>
  </ul>
  
  <p>Lets assume there will be changes to some files occasionally - so avoiding storing a new binary blob for every small change to a pixel - would be nice.</p>
  
  <p>I'm interested to know:</p>
  
  <ul>
  <li>Which options will store a totally new binary blob each time the binary file changes (even a few bytes).</li>
  <li>Does git diff uncompressed binary data better then compressed data (which may change a lot even with minor edits to the uncompressed data).</li>
  <li>I would assume storing many small binary files is less overhead long term, compared to one large binary file, assuming only some of the files are periodically modified, can git handle small changes to large binary files efficiently?</li>
  </ul>
  
  <p>All things considered what are the best options for avoiding a large git repo (as edits are made to the binary files) assuming using binary files can't be avoided completely?</p>