h1. Save/Load Fast Resume This is used so that a full hash check does not have to be performed the first time a torrent is started. Normally all the data for a torrent would be passed through a SHA1 hasher so that data integrity can be verified. With fast resume you can skip this step.

		public void SaveFastResume (List  managers)
		{
			// Store the fast resume for each torrent in a list,
			// then serialise the list to the disk.
			BEncodedList list = new BEncodedList ();
			foreach (TorrentManager manager in managers) {

				// Get the fast resume data for the torrent
				FastResume data = manager.SaveFastResume ();
				
				// Encode the FastResume data to a BEncodedDictionary.
				BEncodedDictionary fastResume = data.Encode ();

				// Add the FastResume dictionary to the main dictionary using
				// the torrents infohash as the key
				list.Add (data);
			}

			// Write all the fast resume data to disk
			File.WriteAllBytes (fastResumePath, list.Encode ());
		}

		public void LoadFastResume (List  managers)
		{
			// Read the main dictionary from disk and iterate through
			// all the fast resume items
			BEncodedList list = (BEncodedList) BEncodedValue.Decode (File.ReadAllBytes (fastResumePath));
			foreach (BEncodedDictionary fastResume in list) {

				// Decode the FastResume data from the BEncodedDictionary
				FastResume data = new FastResume (fastResume);

				// Find the torrentmanager that the fastresume belongs to
				// and then load it
				foreach (TorrentManager manager in managers)
					if (manager.InfoHash == data.Infohash)
						manager.LoadFastResume (data);
			}
		}