I use DotNetZip to add a file to the zip archive that I read from the file system. I would like to convert the resulting ZipFile array to byte []. Any help would be greatly appreciated. My code is shown below.
public byte[] AddPrjFile(FileStream shapeFileZip, Uri prjLocation) { string prjFileAbsPath = prjLocation.AbsolutePath; using (ZipFile zip = ZipFile.Read(shapFileZip)) { ZipEntry e = zip.AddFile(prjFileAbsPath); e.FileName = zipFile.Name + ".prj"; } return byte_array; }
source share