Platforms to show: All Mac Windows Linux Cross-Platform
/Compression/zip
Feedback.
Function:
You find this example project in your Plugins Download as a Realbasic project file within the examples folder: /Compression/zip
This example is the version from Thu, 23th Dec 2009.
Notes: Last modified: Thu, 23th Dec 2009
Feedback.
Function:
You find this example project in your Plugins Download as a Realbasic project file within the examples folder: /Compression/zip
This example is the version from Thu, 23th Dec 2009.
Notes: Last modified: Thu, 23th Dec 2009
Class App
Inherits Application
// Event implementations
Sub Open()
dim z as ZipMBS
dim f as FolderItem
dim d as date
dim b as BinaryStream
dim info as ZipFileInfoMBS
f=SpecialFolder.Desktop.Child("test.zip")
z=new ZipMBS(f,0)
f=GetFolderItem("zip.rbp")
b=f.OpenAsBinaryFile(false)
d=f.ModificationDate
info=new ZipFileInfoMBS
'info.Day=d.day
'info.Month=d.Month-1
'info.Year=d.Year
'info.Minute=d.Minute
'info.hour=d.hour
'info.Second=d.Second
info.SetDate d
info.ExternalFileAttributes=0
info.InternalFileAttributes=0
info.DosDate=0
z.CreateFile "zip.rbp", info, "extra local1", "extra global1", "comment1", z.MethodDeflated, z.CompressionBestCompression
while not b.EOF
z.Write b.Read(100000)
wend
z.CloseFile
f=GetFolderItem("unzip.rbp")
b=f.OpenAsBinaryFile(false)
d=f.ModificationDate
info=new ZipFileInfoMBS
'info.Day=d.day
'info.Month=d.Month-1
'info.Year=d.Year
'info.Minute=d.Minute
'info.hour=d.hour
'info.Second=d.Second
info.SetDate d
info.ExternalFileAttributes=0
info.InternalFileAttributes=0
info.DosDate=0
z.CreateFile "unzip.rbp", info, "extra local2", "extra global2", "comment2", z.MethodNone, z.CompressionNo
while not b.EOF
z.Write b.Read(100000)
wend
z.CloseFile
z.Close("global comment")
quit
End Sub
End Class
See also: