     } 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)
     }
   }
 

import Foundation

private let LINE_FEED: UInt8 = 10


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

    print("Loading Index version \(version)... ")

    if let value = MessagePack.unpack(payloadData) {
      if let dictionary = value.dictionaryValue {
        let index = Index(dictionary: dictionary)

        println("Done")
        return
      }
    }
    println("Error reading MessagePack data")
  }

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