Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

compress file

Posted on 2010-08-27
5
Medium Priority
?
926 Views
Last Modified: 2013-12-27
Hi,

How can I compress any file using c# for windows mobile devices/windows ce? Like text file on device.

Thank you
0
Comment
Question by:mkk39
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 33

Assisted Solution

by:pgnatyuk
pgnatyuk earned 600 total points
ID: 33540732
SevenZipSharp is an open source project on CodePlex. Take a look:
http://sevenzipsharp.codeplex.com/

0
 
LVL 3

Expert Comment

by:efatihan
ID: 33540802
Hi,

there are some open source zip libraries but their compression rate is to low. I can advise you to use pocketrar. here is the place to download it. it is freeware:

http://www.rarlab.com/rar/pocketrar393.exe

the rar file will reside somewhere under \\program files\pocket rar\rar.exe
here is an example on how to extract an archive. more information you can find on winrar help file for command line parameters:


string PKatalog = "Storage Card\\AronDB\\MyFile.txt";
string PSource = "\"\\Storage Card\\MyArchive.RAR\"";
string PDestination = "\"\\Storage Card\\\"";
string PRarPlace = "\\Program Files\\Pocket RAR\\rar.exe";
string PCommand = "e -idp -o+";

System.Diagnostics.ProcessStartInfo pi = new System.Diagnostics.ProcessStartInfo(
                PRarPlace,
                PCommand + " " + PSource + " " + PDestination
            );
 
            System.Diagnostics.Process p = new System.Diagnostics.Process();
            p.StartInfo = pi;

            p.Start();
             p.WaitForExit();
           
0
 

Author Comment

by:mkk39
ID: 33541293
With SevenZipSharp  I am getting this error when try to run sample:

Could not load type 'SevenZip.SevenZipExtractor' from assembly 'SevenZipSharp, Version=0.64.3890.29348, Culture=neutral, PublicKeyToken=20DE82C62B055C88'.

Can u please help me to fix it?
0
 
LVL 33

Expert Comment

by:pgnatyuk
ID: 33541418
There is "Discussions" page in that project with all answers. For example:
Usage example with compression switches
http://sevenzipsharp.codeplex.com/Thread/View.aspx?ThreadId=52336

Or simply delete it if it does not want to work for you - it's an open source project, choose another one.

0
 
LVL 5

Accepted Solution

by:
sindhuxyz earned 1400 total points
ID: 33548633
zlibce is easy to use.
0

Featured Post

Use Filtering Commands to Process Files in Linux

Learn how to manipulate data with the help of various filtering commands such as `cat`, `fmt`, `pr`, and others in Linux.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you are anything like me, you install many apps on your phone and have your life on it, sometimes literally.  When I bought my current phone, a Samsung Galaxy S5 from Verizon, they were only selling the versions with 16 GB internal.  I didn't rea…
Learn how to use the free Acronis True Image app to easily transfer data between iPhones and Android phones.
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question