title: How does Couchdb store duplicated attachments?
body: <p>I have a CouchDB database which stores mostly document attachments. </p>
  
  <p>The files are sored in db with URL following structure:
   /db-name/numeric-file-id/official-human-readable-file-name.ext</p>
  
  <p>There is always only one attachment to one document.
  Today I have computed the md5 sums of all of the files and it seems that many of them are duplicates. </p>
  
  <p>I am wondering if couchdb is aware of duplicate attachments and internally stores only some kind of a pointer to a file, and keeps track of reference count, or just simply stores each attachments as is. </p>
  
  <p>I mean, if I put 5 identical 100MB files as attachments, will the database use 100MB or 500MB?</p>