السلام عليكم
الاخوة الاعضاء
السلام عليكم ورحمة الله
اود منكم اذا كانت لديكم اي معلومة عن كيفية ضغط الملفات ان تفيدونا بها
اما كيف اضغط الملفات
او حتى تجميعها في ملف واحد بدون ضغط (اي دون ان يقل حجمها)
جزاكم الله خيرا
السلام عليكم
الاخوة الاعضاء
السلام عليكم ورحمة الله
اود منكم اذا كانت لديكم اي معلومة عن كيفية ضغط الملفات ان تفيدونا بها
اما كيف اضغط الملفات
او حتى تجميعها في ملف واحد بدون ضغط (اي دون ان يقل حجمها)
جزاكم الله خيرا
اخي TODO ياريت توضح اكثر عن الاداه وياريت ترفعنه الاداه للموقع مع مثلا بسيط
اللهم انصر الاسلام والمسلمين

اخي تودو
هل حجم الاداة هو 38 ميغا
حجم الاداة صغيرجدا حوالي 1 ميجا بالسورس كود و العديد من الامثلة هي عبارة عن ملف dll واحد يضاف الى المشروع و كنت استخدمتها من فترة و هذا مثال كما استخدمتها معظمه منقول من الامثلة التي معها
في الداية استخدمت OpenFileDialog لتحد الملفات المراد ضغطها يسمى of1
ثم استخدامت SaveFileDialog لتحديد ملف الحفظ يسمى SaveF1
Private Sub btnCFiles_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCFiles.Click
If of1.ShowDialog = DialogResult.OK Then
If SaveF1.ShowDialog = DialogResult.OK Then
ZipIt(SaveF1.FileName)
End If
End If
End Sub
Private Sub ZipIt(ByVal s As String)
Dim objCrc32 As New Crc32
Dim strmZipOutputStream As ZipOutputStream
strmZipOutputStream = New ZipOutputStream(File.Create(s))
strmZipOutputStream.SetLevel(9)
Dim strFile As String
For Each strFile In of1.FileNames
Dim strmFile As FileStream = File.OpenRead(strFile)
Dim abyBuffer(strmFile.Length - 1) As Byte
strmFile.Read(abyBuffer, 0, abyBuffer.Length)
Dim objZipEntry As ZipEntry = New ZipEntry(Path.GetFileName(strFile))
objZipEntry.DateTime = DateTime.Now
objZipEntry.Size = strmFile.Length
strmFile.Close()
objCrc32.Reset()
objCrc32.Update(abyBuffer)
objZipEntry.Crc = objCrc32.Value
strmZipOutputStream.PutNextEntry(objZipEntry)
strmZipOutputStream.Write(abyBuffer, 0, abyBuffer.Length)
Next
strmZipOutputStream.Finish()
strmZipOutputStream.Close()
MessageBox.Show("Operation complete", Me.Text)
End Sub
Public Shared Sub ZipFile(ByVal strFileToZip As String, ByVal strZippedFile As String, ByVal nCompressionLevel As Integer, ByVal nBlockSize As Integer)
If (Not System.IO.File.Exists(strFileToZip)) Then
Throw New System.IO.FileNotFoundException("The specified file " + strFileToZip + "could not be found. Zipping aborted.")
End If
Dim strmStreamToZip As System.IO.FileStream
strmStreamToZip = New System.IO.FileStream(strFileToZip, System.IO.FileMode.Open, System.IO.FileAccess.Read)
Dim strmZipFile As System.IO.FileStream
strmZipFile = System.IO.File.Create(strZippedFile)
Dim strmZipStream As ZipOutputStream
strmZipStream = New ZipOutputStream(strmZipFile)
Dim myZipEntry As ZipEntry
myZipEntry = New ZipEntry("ZippedFile")
strmZipStream.PutNextEntry(myZipEntry)
strmZipStream.SetLevel(nCompressionLevel)
Dim abyBuffer(nBlockSize) As Byte
Dim nSize As System.Int32
nSize = strmStreamToZip.Read(abyBuffer, 0, abyBuffer.Length)
strmZipStream.Write(abyBuffer, 0, nSize)
Try
While (nSize < strmStreamToZip.Length)
Dim nSizeRead As Integer
nSizeRead = strmStreamToZip.Read(abyBuffer, 0, abyBuffer.Length)
strmZipStream.Write(abyBuffer, 0, nSizeRead)
nSize = nSize + nSizeRead
End While
Catch Ex As System.Exception
Throw Ex
End Try
strmZipStream.Finish()
strmZipStream.Close()
strmStreamToZip.Close()
End Subو الاداة مرفقة
شكرا اخي todo ولكن البرنامج ما اشتغل معايا لاني ماعرفت انزل الاداه او لاني الاداه بالسي مو بالفيجوال دوت نت ياريت تعطينه كيف الاداه انزلها ولا تعطينه مشروع صغير جاهز يشتغل عندك وبارك الله فيك
اللهم انصر الاسلام والمسلمين

التحميل و الامثلة في هذة الصفحة
http://www.icsharpcode.net/OpenSource/Shar...b/Download.aspx
الاخ العزيز تودو
شكرا جزيلا جزيلا لك
ولي استفسار
هل تعلم ماهية هذا الموقع الذي يقدم هذه الادوات؟
اكرر شكري
اقصد اخي العزيز
من هم اصحاب الموقع
رأيت انهم يقدمون الادوات مفتوحة المصدر تقريبا
هذا الموضوع مغلق.