code: function(options) {
    if (!(this instanceof Medea))
      return new Medea(options);
  
    EventEmitter.call(this);
  
    this.active = null;
    this.keydir = new Map();
  
    options = options || {};
  
    this.maxFileSize = options.hasOwnProperty('maxFileSize')
      ? options.maxFileSize : 2147483648; //2GB
  
    this.mergeWindow = options.hasOwnProperty('mergeWindow')
      ? options.mergeWindow : 'always';
  
    this.fragMergeTrigger = options.hasOwnProperty('fragMergeTrigger')
      ? options.fragMergeTrigger : 60; // fragmentation >= 60%
  
    this.deadBytesMergeTrigger = options.hasOwnProperty('deadBytesMergeTrigger')
      ? options.deadBytesMergeTrigger : 536870912; // dead bytes > 512MB
  
    this.fragThreshold = options.hasOwnProperty('fragThreshold')
      ? options.fragThreshold : 40; // fragmentation >= 40%
  
    this.deadBytesThreshold = options.hasOwnProperty('deadBytesThreshold')
      ? options.deadBytesThreshold : 134217728; // dead bytes > 128MB
  
    this.smallFileThreshold = options.hasOwnProperty('smallFileThreshold')
      ? options.smallFileThreshold : 10485760 // file < 10MB
  
    this.maxFoldAge = options.hasOwnProperty('maxFoldAge') ? options.maxFoldAge : -1;
    this.maxFoldPuts = options.hasOwnProperty('maxFoldPuts') ? options.maxFoldPuts : 0;
    this.expirySecs = options.hasOwnProperty('expirySecs') ? options.expirySecs : -1;
    this.dirname = options.hasOwnProperty('dirname') ? options.dirname: null;
    this.readOnly = false;
    this.bytesToBeWritten = 0;
    this.readableFiles = [];
    this.fileReferences = {};
    this.compactor = new Compactor(this);
    this.setMaxListeners(Infinity);
  }
docs: /*var FileStatus = function() {
  this.filename = null;
  this.fragmented = null;
  this.deadBytes = null;
  this.totalBytes = null;
  this.oldestTimestamp = null;
  this.newestTimestamp = null;
  };