bool LoadFiles(SdpArchive fileList)
		{
			try
			{
				doneAll = 0;

				var hashesToDownload = new List<Hash>();
				var bitArray = new BitArray(fileList.Files.Count);
				for (var i = 0; i < fileList.Files.Count; i++)
				{
					if (!pool.Exists(fileList.Files[i].Hash))
					{
						bitArray.PushBit(true);
						hashesToDownload.Add(fileList.Files[i].Hash);
					}
					else bitArray.PushBit(false);
				}

				var wr = WebRequest.Create(string.Format("{0}/streamer.cgi?{1}", urlRoot, PackageHash));
				wr.Method = "POST";
				wr.Proxy = null;
				var zippedArray = bitArray.GetByteArray().Compress();
				var requestStream = wr.GetRequestStream();
				requestStream.Write(zippedArray, 0, zippedArray.Length);
				requestStream.Close();

				var response = wr.GetResponse();
				Length = (int)(response.ContentLength + fileListWebGet.Length);
				var responseStream = response.GetResponseStream();

				var numberBuffer = new byte[4];
				var cnt = 0;
				while (responseStream.ReadExactly(numberBuffer, 0, 4))
				{
					if (IsAborted) break;
					var sizeLength = (int)SdpArchive.ParseUint32(numberBuffer);
					var buf = new byte[sizeLength];

					if (!responseStream.ReadExactly(buf, 0, sizeLength, ref doneAll))
					{
						Trace.TraceError("{0} download failed - unexpected endo fo stream", Name);
						return false;
					}
					pool.PutToStorage(buf, hashesToDownload[cnt]);
					cnt++;
				}
				if (cnt != hashesToDownload.Count)
				{
					Trace.TraceError("{0} download failed - unexpected endo fo stream", Name);
					return false;
				}
				Trace.TraceInformation("{0} download complete - {1}", Name, Utils.PrintByteLength(Length));
				return true;
			}
			catch (Exception ex)
			{
				Trace.TraceError("Error downloading {0}: {1}", Name, ex);
				return false;
			}
		}
		SdpArchive GetFileList()
		{
			SdpArchive fileList;
			tempFilelist = GetTempFileName();
			fileListWebGet.Start(urlRoot + "/packages/" + PackageHash + ".sdp");
			fileListWebGet.WaitHandle.WaitOne();

			if (fileListWebGet.Result != null)
			{
				File.WriteAllBytes(tempFilelist, fileListWebGet.Result);
				using (var fs = new FileStream(tempFilelist, FileMode.Open)) fileList = new SdpArchive(new GZipStream(fs, CompressionMode.Decompress));
			}
			else throw new ApplicationException("FileList has download failed");
			return fileList;
		}
            public MemoryStream ReadFile(SpringPaths paths, string namePath)
            {
                var sdpPath = Path.Combine(paths.WritableDirectory, "packages", $"{Hash}.sdp");
                if (File.Exists(sdpPath))
                {
                    SdpArchive sdp;
                    using (var fs = new FileStream(sdpPath, FileMode.Open)) sdp = new SdpArchive(new GZipStream(fs, CompressionMode.Decompress));

                    var entry = sdp.Files.FirstOrDefault(x => x.Name.ToLower() == namePath.ToLower());
                    if (entry != null) return new Pool(paths).ReadFromStorageDecompressed(entry.Hash);
                }
                return null;
            }