     public init() {}
     
     public func reset() {
-        self.encodeOutput = NSMutableData()
+        self.output = NSMutableData()
         keeptIntType = false
+    }
+    
+    var length : Int {
+        get {
+            return output.length
+        }
     }
     
     

        }
        
        return false
    }
    
    public func decode() -> Int? {

    func writeValue<T>(value : T) {
        
        var data = value
        output.appendBytes(&data, length:sizeof(T))
    }
    
    func writeType(type : CoderType) {
