         position += range.length
     }
     
-    func writeUInt64(var value:UInt64)
-    {
-        if endian == Endian.BIG_ENIDAN
+    func writeUInt64(var value:UInt)
+    {
+        if endian == Endian.BIG_ENDIAN
         {
             value = value.bigEndian
         }

        range.length = 8
        
        var value:Double = 0.0
        if endian == Endian.BIG_ENIDAN
        {
            var bytes = [UInt8](count: range.length, repeatedValue: 0)
            data.getBytes(&bytes, range: range)
            bytes.reverse()
            
            value = UnsafePointer<Double>(bytes).memory
        }

        var value:UInt16 = 0
        data.getBytes(&value, range: range)
        position += data.length
        return endian == Endian.BIG_ENDIAN ? value.bigEndian : value
    }
    
    func readUInt32()->UInt32
