Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#

how cane reduce size for any file using C# windows form
Posted 21-Nov-12 12:09pm
Comments
Sergey Alexandrovich Kryukov at 21-Nov-12 18:36pm
   
File size and Form? Don't mix different things in one pile. Ever heard of separation of concerns?
--SA

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Please see my comment to the question. It's not clear what do you mean by "reduce" here, but you should understand that most files can be effectively compressed in smaller size in a lossless way:
http://en.wikipedia.org/wiki/Lossless_compression[^].
 
If could be, among many other algorithms, Deflate, GZip or ZIP. Please see:
http://msdn.microsoft.com/en-us/library/system.io.compression.aspx[^].
 
For working with ZIP, you can use #ziplib:
http://www.icsharpcode.net/opensource/sharpziplib/[^].
 
Another option is using SevenZipSharp, a .NET wrapper of the famous 7-Zip:
http://en.wikipedia.org/wiki/7-Zip[^],
http://sevenzipsharp.codeplex.com/[^].
 
Both ZIP libraries are open-source.
 
—SA
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 718
1 OriginalGriff 420
2 CPallini 385
3 George Jonsson 231
4 Richard Deeming 145
0 OriginalGriff 5,450
1 CPallini 4,500
2 Sergey Alexandrovich Kryukov 4,272
3 George Jonsson 3,057
4 Gihan Liyanage 2,445


Advertise | Privacy | Mobile
Web01 | 2.8.140916.1 | Last Updated 21 Nov 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100