Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
180
Compressing using Infragestics Compression
posted

Hi ,

I've tried the following code to insert a png file to a zip file. But I didn't find any compression happened.

Please help.

 

 

 

 

 

 

 

 

 

 

 

Dim fs As Stream = New IsolatedStorageFileStream("Template.zip", FileMode

.Open, iso)

 

 

 

Dim zFile As ZipFile = New ZipFile

(fs)

 

 

 

Dim FolderPath As String =

"Resources/Images/"

 

 

 

Dim newDir As ZipEntry = ZipEntry

.CreateDirectory(FolderPath)

zFile.Entries.Add(newDir)

 

 

 

Dim EntryName As String =

"Image_0.png"

 

 

 

Dim EntryContent As Stream = New IsolatedStorageFileStream("Image_0.png", FileMode

.Open, iso)

 

 

 

Dim newFile As ZipEntry = ZipEntry

.CreateFile(EntryName, FolderPath, EntryContent)

zFile.Entries.Add(newFile)

zFile.CompressionLevel =

 

 

CompressionLevel

.Level9

 

 

 

Dim newFS As Stream = New IsolatedStorageFileStream("MyImage.xps", FileMode

.Create, iso)

Parents Reply Children
No Data