 import Foundation
+import MessagePack
 
 private let LINE_FEED: UInt8 = 10
 

      return printAndExit("Unable to read Index header data")
    }

    println("Loading Index version \(version)... ")
  }

  class func readHeaderAndPayload(path: String) -> (NSData, NSData) {

    } else {
      printAndExit("Unable to compiled regular expression: \(error)")
      return nil
    }
  }

  struct Package {
    let name: String
    var version: AnyObject
  }

  var packages = Dictionary<String, Package>()

  init(dictionary: [MessagePackValue : MessagePackValue]) {
    for (nameValue, packageValue) in dictionary {
      let name    = nameValue.stringValue!
      let package = packageValue.dictionaryValue!

      let version = package["version"]!.stringValue!

      packages[name] = Package(name: name,
                               version: version)
    }
  }

