/**
 * Created by tushar.mathur on 25/01/16.
 */

'use strict'

module.exports = buffer => {
  var offset = 0
  return buffer
    .map(buffer => ({buffer, offset}))
    .tap(x => offset += x.buffer.length)
}

@@ -78,25 +78,69 @@
 s = 
+(
 buffer
- =%3E %7B%0A  var
+, offset) =%3E %7B%0A  if (typeof offset !== 'number') %7B%0A   
  off
@@ -147,16 +147,20 @@
 set = 0%0A
+  %7D%0A
   return

add optional offset value as a param