 
     process.stdout.write dump
 
+  @zeropad: (width, num) ->
+    num += ''
+    while num.length < width
+      num = '0' + num
+    num
+
 module.exports = Bits

        strline += String.fromCharCode byte
      else
        strline += ' '
      dump += zeropad(2, byte.toString(16))
      col++
      if col is 16
        endline()

catch e
  # buffertools is not available

class Bits
  constructor: (buffer) ->
    @buf = null
