               callback(written)
 
 
-exports.Writer = Writer+exports.Writer = Writer


  pack: (name, callback) ->
    out = fs.createWriteStream("#{name}.hpub")
    archive = archiver.createZip({level: 1})
    archive.pipe(out)

    archive.on 'error', (err) ->

      unless err
        series = _.union series, result
        async.forEachSeries series, (file, next) =>
            archive.append fs.createReadStream("#{@folder}/#{file}"), {name: "#{file}"}, -> 
                next()
          , (err) ->
            archive.finalize (err, written) ->
