Results 1 to 6 of 6

Thread: Compress files in vb.net?

  1. #1

    Thread Starter
    Addicted Member tgf-47's Avatar
    Join Date
    Feb 2010
    Location
    CapeTown, South Africa -34.01244,18.337415
    Posts
    209

    Question Compress files in vb.net?

    I'm just wondering if it is possible to create an vb.net application to compress files, without using a 3rd party app.

    If yes, can you please point me in the right direction, give me some tips, tutorials or sample code?

    I will appreciate any help, thanks

  2. #2
    PowerPoster sparrow1's Avatar
    Join Date
    May 2005
    Location
    Globetrotter
    Posts
    2,820

    Re: Compress files in vb.net?

    Hi,

    Compressing and Decompressing files as very complex.
    Perhaps you can find some good information, here.
    Wkr,
    sparrow1

    If I helped you, don't forget to Rate my post. Thank you

    I'm using Visual Studio.Net 2003 and
    2005
    How to learn VB.Net Create setup with VB 2005 Drawing for beginners VB.Net Tutorials GDI+ Tutorials
    Video's for beginners

  3. #3

    Thread Starter
    Addicted Member tgf-47's Avatar
    Join Date
    Feb 2010
    Location
    CapeTown, South Africa -34.01244,18.337415
    Posts
    209

    Re: Compress files in vb.net?

    Quote Originally Posted by sparrow1 View Post
    Hi,

    Compressing and Decompressing files as very complex.
    Perhaps you can find some good information, here.
    Hi sparrow1.

    I tested that code before. It seems to make the file bigger, rather than to compress it.

    A .docx file went from 147kb to 179kb after compression with application.

    Thanks a lot for the link though

  4. #4
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: Compress files in vb.net?

    I use the #ZipLib library from ic#code ... http://sharpdevelop.net/OpenSource/SharpZipLib/ when I need to compress/decompress files.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  5. #5
    New Member
    Join Date
    May 2011
    Location
    New York
    Posts
    12

    Re: Compress files in vb.net?

    I was trying to solve this issue today. I gave up on a pure-VB.net solution. Instead I just downloaded the command line version of 7zip and use
    Code:
    Process.start("7za a -tzip archive.zip Folder", , True)
    to compress my folder(and wait for it to finish). If I had done that from the get-go I would have saved an hour or two.

    Sure, I have to include the executable, but since I'm not distributing this application I really don't care.

  6. #6
    Lively Member agent_007's Avatar
    Join Date
    Jan 2010
    Posts
    93

    Re: Compress files in vb.net?


    Im Pro in C#,VB.NET,Batch,Socket Programming, SPY Software Programming, VB6, Win32Api, VBscript, Windows Registry, ASP.NET, PHP, Jquery, AJAX.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width