sharpziplib

Is it safe to call ICsharpCode.SharpZipLib in parallel on multiple threads

核能气质少年 提交于 2020-01-24 08:31:42
问题 We are currently using for compression the GZipOutputStream class of ICsharpCode.SharpZipLib library. We do it from a single thread. I want to split my input data stream into chunks and compress them in parallel. I'm worried though that this library may have some statics inside which will be overwritten from multiple threads and therefore corrupt the resulting stream. Any thoughts will be appreciated. 回答1: It is standard practice to make sure all static members are thread-safe when coding

Delete Folder From .Jar While Treating as a Zip

只谈情不闲聊 提交于 2020-01-16 00:51:17
问题 I need to delete a folder from a .jar file, but treating it as a .zip file with sharpziplib. Is there any way to do so? I have tried before to "unzip" the .jar file using sharpziplib and then delete it and rezip it, but to no avail- not to mention it is much slower to do it that way. How can I directly delete the folder? 回答1: A JAR is similar to a ZIP file. A JAR is a Java ARchive . Just like you can't directly delete a file/folder without unpacking a ZIP file, you have to unpack a JAR file

Extract zip entries to another Zip file

别等时光非礼了梦想. 提交于 2020-01-04 04:15:09
问题 Can anyone tell me why the following code doesnt work? I am using the SharpZipLib API for the Zip streams, latest version DL'ed today from their site. Im attempting to use this logic to merge the contents of one zip file into another, without having to perform IO on the disk, as the intended zip files may contain reserved file names for windows. I have tried this with multiple different source and destination zip files (those that contain reserved names and those that dont). The code does not

Add files to ZIP without paths, using SharpZipLib

左心房为你撑大大i 提交于 2020-01-02 00:49:07
问题 I need to combine 3 files into 1 zip file and make it available to download for the user. I am able to achieve my requirement except one thing: it zips the files into the subfolders. For example, my files are located like the following: C:\TTCG\WebSites\Health\ABC.CSV C:\TTCG\WebSites\Health\XYZ.CSV C:\TTCG\WebSites\Health\123.CSV But in the zip file, it zip the files in the folder by using "TTCG\WebSites\Health\" as the path. Please see the attach file. I don't want the folders in the path.

Found conflicts between different versions of “ICSharpCode.SharpZipLib” that could not be resolved

試著忘記壹切 提交于 2019-12-25 00:33:55
问题 I am using NPOI in my MVC 5 project. When I installed it via Nuget, I have installed SharpLib 0.86 because it is a dependency. After doing this, NPOI generates a 0 bytes file. When I build the solution, this error appears in error list: Found conflicts between different versions of "ICSharpCode.SharpZipLib" that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed. I am sure NPOI does not work properly cause of this. What's the

Renaming ICSharpCode.SharpZipLib.dll

人走茶凉 提交于 2019-12-23 02:55:17
问题 well I am having a problem renaming the ICSharpCode.SharpZipLib.dll file to anythig else. I am trying to shorten the file name. I reference the assembly in the project, but when the program reaches the statements where I use the library. It spawns an error that it could not find the assembly or file 'ICSharpCode.SharpZipLib'. When I change the file name back to ICSharpCode.SharpZipLib.dll the application works noramally. So, is there any way to change the file name. Also, am I allowed to

Is there a library to unzip .Z files using VB.NET?

主宰稳场 提交于 2019-12-19 08:13:29
问题 I need to unzip a list of .Z files which will be kept in a folder using Visual Basic.NET. For example, consider that there is a folder like C:\FilesToBeUnzipped . Inside this folder there will some 5 to 6 files with .Z as extension. I need to unzip all these .Z files and save the unzipped files in a folder like C:\UnzippedDataFiles . Is this possible in VB.NET? Is there any free component or class library to achive it? 回答1: I also ran into this issue as well, just needed to decompress a *.Z

c# sharpziplib adding file to existing archive

蓝咒 提交于 2019-12-17 20:46:04
问题 am trying to add a file to an existing archive using the following code. When run no errors or exceptions are shown but no files are added to the archive either. Any ideas why? using (FileStream fileStream = File.Open(archivePath, FileMode.Open, FileAccess.ReadWrite)) using (ZipOutputStream zipToWrite = new ZipOutputStream(fileStream)) { zipToWrite.SetLevel(9); using (FileStream newFileStream = File.OpenRead(sourceFiles[0])) { byte[] byteBuffer = new byte[newFileStream.Length - 1];

C#.net identify zip file

人盡茶涼 提交于 2019-12-13 07:34:45
问题 I am currently using the SharpZip api to handle my zip file entries. It works splendid for zipping and unzipping. Though, I am having trouble identifying if a file is a zip or not. I need to know if there is a way to detect if a file stream can be decompressed. Originally I used FileStream lFileStreamIn = File.OpenRead(mSourceFile); lZipFile = new ZipFile(lFileStreamIn); ZipInputStream lZipStreamTester = new ZipInputStream(lFileStreamIn, mBufferSize);// not working lZipStreamTester.Read

Decompress SharpZipLib string in php or JS?

家住魔仙堡 提交于 2019-12-13 05:22:59
问题 I am on a linux server connecting to a webservice via PHP/Soap. The problem is that a method is zipping the response via SharpZipLib. So all I get in return is a garbled string. Does anyone know of a way to unzip this with PHP or JS? Thanks! Update: This is the compressed test data that gets returned: UEsDBC0AAAAIAI5TWz3XB/zi//////////8EABQAZGF0YQEAEADWAgAAAAAAABYBAAAAAAAAfZLvToNAEMTnUXyDatXEDxcS/3zxizH6BBVESaESKFHf3t+cOWgtNhcuYXd2Zndug570qjdV6rVVpxV3pQ9tlCnohv+ab6Mc1J0G7kynZBb