Quantcast
Channel: VBForums - CodeBank - Visual Basic 6 and earlier
Viewing all articles
Browse latest Browse all 1450

MiniZip.cls , vb6 unzip File Class by zlibwapi.dll

$
0
0
MiniZip.cls , vb6 unzip File Class by zlibwapi.dll

code from here ,and add more functions

How to unpack a ZIP file using the library zlibwapi.dll ?-VBForums
Quote:

Originally Posted by HackerVlad View Post
Thanks to everyone who helped me find the right code! Now I was able to write a small program that allows you to read the contents (the list of files and the files themselves) of ZIP archives. My example shows how to unpack the necessary files on the fly into a byte array and upload image files without creating temporary files.

zlibwapi.dll it is only used here to decompress the ZIP buffer. We get the list of files inside the ZIP archive manually with our own code.


Code:

get file byte array from zip child file ,without save to disk.



Function ReadFileByte(ByVal zipChildFileName As String, Buffer() As Byte) As Boolean
end function

Function UnzipAll(Folder As String) As Boolean 'by xiaoyao #abcd
    'unzip all file to a folder
    MsgBox "please add code"
End Function

Function UnzipChildFolder(Folder As String) As Boolean 'by xiaoyao #abcd
    'unzip a Child Folder from zip a Disk folder
    MsgBox "please add code"
End Function

Function UnzipToFile(ByVal zipChildFileName As String) As Boolean
 'by xiaoyao #abcd
    Dim Ret As Long, Buffer() As Byte
    If ReadFileByte(zipChildFileName, Buffer) Then
        UnzipToFile = PutToFileBin(zipChildFileName, Buffer)
    End If
End Function

Attached Images
 
Attached Files

Viewing all articles
Browse latest Browse all 1450

Trending Articles