User (Old forums)MemberMay 12, 2008 at 6:08 pmPost count: 23064
I have a webservice project currently that uses Dart’s PowerTCP zip stuff and want to convert it over to Xceed Zip. I’m having a lot of trouble figuring out if your software has a solution for this.
Here is what the webservice does currently:
1. Retrieves multiple datasets from a database
2. Adds them seperately to 1 zip archive by converting them to a memorystream using dataset.writexml(MemoryStream,XmlWriteMode.WriteSchema). Each dataset is named for reference in the zip file eg: onhand.data, item.data,category.data etc Each dataset is also encrypted using AES 128 bit encryption with a password retrieved from the database.
3. Dart’s Archive allows me to then zip all these streams into another memory stream which I then return as a byte array using MemoryStream.ToArray
I’ve seen some examples here on compressing a memorystream/dataset, but nothing on compressing multiple memorystream into one archive and naming each seperately. Is this possible with Xceed? My biggest hurdle seems to be that there’s no seperation in your product on the ZipFile and the items zipped in them. Are there seperate classes for the archive and archiveitems? Any help pointing me in the right direction would be greatly appreciated. Also, I use VB to program, not that I don’t understand C# code, but examples in VB would be quicker for me to understand. Thanks in advance.
Imported from legacy forums. Posted by Stephen (had 1262 views)User (Old forums)MemberMay 13, 2008 at 3:37 pmPost count: 23064
Nevermind…I figured it out. What a convoluted mess though! Why is that everything that has to be done with your solution still requires the developer to read and write from streams/files/folders in do loops using buffers? Couldn’t you have handled all that in your side of the code? FYI: your competitor does. Dart just hasn’t ported their code to .NET 2.0 framework yet.
Imported from legacy forums. Posted by Stephen (had 420 views)User (Old forums)MemberMay 26, 2008 at 3:08 pmPost count: 23064
Not sure I totally understand what you want to do, but first, reading and writing to stream requires to use bytes. Second, once you have your bytes into a stream, you can transform this stream to a file, either in memory (e.g. MemoryFile) or on disk (e.g. DiskFile). Well, actually, it is best to wrap your stream around a MemoryFile, and then write the bytes to the stream, which will automatically write the bytes to the MemoryFile.
Moreover, we provide the ZipArchive class for the archive itself, and also ZippedFile and ZippedFolder for items within the archive. For example, you can use a MemoryFile to zip a dataset within a ZipArchive, and retrieve it with a ZippedFile.
As for point 3, we have a code snippet in our documentation that seems to do exactly that :
Imported from legacy forums. Posted by André (had 1529 views)
- You must be logged in to reply to this topic.