void ModifyEntry(ZipFile workFile, ZipUpdate update)
{
workFile.WriteLocalEntryHeader(update);
long dataStart = workFile.baseStream_.Position;
// TODO: This is slow if the changes don't effect the data!!
if ( update.Entry.IsFile && (update.Filename != null) ) {
using ( Stream output = workFile.GetOutputStream(update.OutEntry) ) {
using ( Stream source = this.GetInputStream(update.Entry) ) {
CopyBytes(update, output, source, source.Length, true);
}
}
}
long dataEnd = workFile.baseStream_.Position;
update.Entry.CompressedSize = dataEnd - dataStart;
}