     }
 
     
-    static func DCWriteObjectAlias(object : NSObject, coder : DCCoder) -> Bool {
+    static func FCWriteObjectAlias(object : NSObject, coder : FCCoder) -> Bool {
         
         let max8 = Int(UInt8.max)
         let max16 = Int(UInt16.max)

    
    // MARK: Write Methode
    
    static func DCWriteBool(value: Bool, output : NSMutableData) {
        
        var data  = value
        output.appendBytes(&data, length:sizeof(Bool))
    }
    
    // Int8
    static func DCWriteInt8(value: Int8, output : NSMutableData) {
        
        var data  = value
        output.appendBytes(&data, length:sizeof(Int8))
    }
    
    // Unit8
    static func DCWriteUInt8(value: UInt8, output : NSMutableData) {
        
        var data  = value
        output.appendBytes(&data, length:sizeof(UInt8))
    }
    
    // Int16
    static func DCWriteInt16(value: Int16, output : NSMutableData) {
        
        var data  = value
        output.appendBytes(&data, length:sizeof(Int16))
    }
    
    // UInt16
    static func DCWriteUInt16(value: UInt16, output : NSMutableData) {
        
        var data  = value
        output.appendBytes(&data, length:sizeof(UInt16))
    }
    
    // Int32
    static func DCWriteInt32(value: Int32, output : NSMutableData) {
        
        var data  = value
        output.appendBytes(&data, length:sizeof(Int32))
    }
    
    // UInt32
    static func DCWriteUInt32(value: UInt32, output : NSMutableData) {
        
        var data  = value
        output.appendBytes(&data, length:sizeof(UInt32))
    }
    
    // Int64
    static func DCWriteInt64(value: Int64, output : NSMutableData) {
        
        var data  = value
        output.appendBytes(&data, length:sizeof(Int64))
    }
    
    // UInt64
    static func DCWriteUInt64(value: UInt64, output : NSMutableData) {
        
        var data  = value
        output.appendBytes(&data, length:sizeof(UInt64))

        return count
    }
    
    final func FCCacheWrittenString(string : NSString) -> Int {
        
        let count = stringCache.count
        stringCache[string as String] = count + 1
        return count
    }
    
    // no impelemtation for FCIndexOfCachedObject required
    // use: var index = coder.objectCache[object]
    
    override public var allowsKeyedCoding: Bool {
        get {
            return true
        }
    }
    
    override public func encodeObject(objv: AnyObject?, forKey key: String) {
        DataCoder.FCWriteObject(objv, coder: self)
        DataCoder.FCWriteObject(key, coder: self)
    }
    
    override public func encodeConditionalObject(objv: AnyObject?, forKey key: String) {
        
        // This implementation is a more or less 1:1 port of the implementation inf
        // in the objc version of FactCoder
        // According my understanding fullfill this not the NSCoder requirements
        // this method write the reference if the object was already stored
        // But what is with the case the when the object will be stored later?
        // see original code

        if let obj = objv as? NSObject {
           let index = objectCache[obj]
            
            if index != nil {
                DataCoder.FCWriteObject(objv, coder: self)
                DataCoder.FCWriteObject(key, coder: self)
            }
            
        } else {
            assertionFailure("Object \"\(self)\" is not a NSObject")
        }
    }
    
    /**
    - (void)encodeConditionalObject:(id)objv forKey:(__unsafe_unretained NSString *)key
    {
    if (FCIndexOfCachedObject(objv, _objectCache) != NSNotFound)
    {
    FCWriteObject(objv, self);
    FCWriteObject(key, self);
    }
    }
    */
    
    override public func encodeBool(boolv: Bool, forKey key: String) {
        
        // FCWriteObject(@(boolv), self);
        DataCoder.FCWriteObject(NSNumber(bool: boolv), coder: self)
        DataCoder.FCWriteObject(key, coder: self)
        
        // TODO improve and use FCWriteBool methode
    }
    
    override public func encodeInt(intv: Int32, forKey key: String) {
        DataCoder.FCWriteObject(NSNumber(int: intv), coder: self)
        DataCoder.FCWriteObject(key, coder: self)
    }
    
    override public func encodeInt32(intv: Int32, forKey key: String) {
        DataCoder.FCWriteObject(NSNumber(int: intv), coder: self)
        DataCoder.FCWriteObject(key, coder: self)
    }
    
    override public func encodeInt64(intv: Int64, forKey key: String) {
        DataCoder.FCWriteObject(NSNumber(longLong: intv), coder: self)
        DataCoder.FCWriteObject(key, coder: self)
    }
    
    override public func encodeInteger(intv: Int, forKey key: String) {
        DataCoder.FCWriteObject(NSNumber(long: intv), coder: self)
        DataCoder.FCWriteObject(key, coder: self)
    }
    
    override public func encodeFloat(realv: Float, forKey key: String) {
        DataCoder.FCWriteObject(NSNumber(float: realv), coder: self)
        DataCoder.FCWriteObject(key, coder: self)
    }
    
    override public func encodeDouble(realv: Double, forKey key: String) {
        DataCoder.FCWriteObject(NSNumber(double: realv), coder: self)
        DataCoder.FCWriteObject(key, coder: self)
    }
    
    override public func encodeBytes(bytesp: UnsafePointer<UInt8>, length lenv: Int, forKey key: String) {
        DataCoder.FCWriteObject(NSData(bytes: bytesp, length: lenv), coder: self)
        DataCoder.FCWriteObject(key, coder: self)
    }

}

class DCDecoder : NSCoder {
