Compressing file ????

hi to all........
I am trying to compress file(text,doc,dat,jpeg) etc, so that the compression ratio is less than what we get with winzip or winrar...
I am using PPM ( Prediction by partial Matching ) algorithm i getting compression of file 320 kb to 63 kb, but winzip compress it to 43 kb and winrar compress it to 41 kb. I want compression more than this.
any body having idea regarding best compression algorithm...
help
thanks

Sure. Consider this compression algorithm:if the file is consists of N repetitions of a zero byte:
    output the numbers zero and N.
else:
    output the number 1 and the original file.Any file that is a string of zeros is compressed to only a few bytes, which is much better than winzip and winrar do.

Similar Messages

  • Problem in Compresses file.Not able to see the data in file

    Hi All,
    I am downloading file into application server.
    Using:
    OPEN DATASET file FOR OUTPUT FILTER 'compress'.
    OR
    DATA: l_command(100) type c.
       CONCATENATE 'compress ' p_file INTO lw_command SEPARATED BY space.
        ENDIF.
        CALL 'SYSTEM' ID 'COMMAND' FIELD lw_command.
    When I see the file content it contains junk characters.
    If I want to see the data Do I need to uncompress the file.
    con't we see the data without uncompressing the file?.
    Regards,
    vinod

    Hi,
    Uncompress is required to read the content of an Compressed file.
    OPEN DATASET DSN FOR OUTPUT FILTER 'compress'.
    OPEN DATASET DSN FOR INPUT FILTER 'uncompress'.
    The first OPEN statement opens the file so that the displayed data can be read into it in compressed form.
    The second OPEN statement opens the file so that the data is decompressed when it is read from the file.
    http://www.sapnet.ru/abap_docu/ABAPOPEN_DATASET.htm#&ABAP_ADDITION_8@14@

  • Problems with compressing  files with right hand click. it does not work.

    Problems with compressing files with right hand click.
    I am using the compress function in the Mac OS (File > Compress XX) from time to time. Today it does not work anymore. OS 10.5.6
    I get a message: The content list cannot be created for compressing.
    I tried it with files and folders and keep getting this message. Anybody any idea as to how to fix this

    Thanks I love my macbook!!!!
    I also got further problems such as copy-paste not working etc.
    so I fixed it just this morning by running Applejack 1.5 and am back up running noticing your post.
    thanks for helping though!

  • Reading a Compressed File from a ZIP File, which is an entry of ZIP File

    Hello, Experts,
    Would it be possible somebody to help me with code example for the following problem?
    I want to read a compressed file from a ZIP file, which is an entry of ZIP File, without extacting/writing files on file system. Is this possible?
    Lets say we have a ZipFile1. There is ZipFile2 inside ZipFile1. And inside ZipFile2 is FileA. The scenario is reading FileA without extracting on file system.
    Thank you in advance for your help.
    Cheers
    RADY

    The classes you want to be using are java.util.zip.ZipInputStream and and ZipEntry from the same package. Construct the ZipInputStream with the input you have for the outer zip. Loop with ZipInputStream.getNextEntry until you find the inner zip you're looking for - that method returns a ZipEntry, and you get the name of the zip entry with ZipEntry.getName. Read the ZipInputStream from that point into some buffer, and read that buffer into a new ZipInputStream - rinse and repeat until you have the contents of the file in the zip in the zip...

  • How to search for file within compressed file

    I hope i can explain this correctly, I apologize in advance.
    What is the command to search for a file that may/may not exist within another compressed file?
    Situation is that I have a cron job that compresses the files in a folder on a scheduled date. I now need to search for a file that may exists in one of the several compressed files, which was a result of the cron job.
    Thanks in advance

    There's an open source utility called zgrep. You can probably get it from http://www.sunfreeware.com/ .
    HTH,
    Roger S.

  • Export to disk compressed files only? bad bad bad

    When I select the export to disk under the share menu, it will only export compressed files. This is a drag because the only way to export an aiff is if you send it to itunes. Am I wrong about this, is there something that I am missing?
    Exporting to disk allows you to select a destination for the export and this is highly desirable because I don't like cluttering up my itunes library with snippets of songs or individual tracks.
    If this is the case than GB 3 has a serious design flaw. Export to disk is a basic function of all music software. To hobble this on purpose is beyond my understanding.
    Anyone out there know the answer?

    Garageband 1 and 2 have the same flaw. 8^) Exporting to iTunes is the "official" Apple way. I would create a special playlist for your GB exports so you can keep track of them and delete them as necessary.

  • File Share Search problem with Compress file

    I have a content source in SharePoint 2013 search which crawl files from a file share. Some of the files have "Compress contents to save disk" attribute set to true. 
    These files are being crawled as I can see them in Crawl logs. But when I search for these documents in search center, it only return the documents which don't have compression attribute set.  I have even tried searching document title. Any idea?

    Hi Rashid,
    What keyword did you use for searching the compressed file?
    As your description, I set a file as the below:
    Then I created a File Share content source pointed to the folder which contains the file, then start a full crawl.
    After crawling, I went to my search center, and searched, the result was:
    When you search the compressed file, check whether the item title returns a part of the content of the document.
    Best Regards,
    Wendy
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Wendy Li
    TechNet Community Support

  • Permission denied - unable to "compress" file

    Hi I have a weird scenario which I would need help on.
    SunOS mysvr 5.10 Generic_127127-11 sun4u sparc SUNW,Sun-Fire-880
    I have a user "myuat" which belongs to a group "pc"
    # id
    uid=30008(myuat) gid=101(pc)
    and in /etc/group
    pc::101:otheruat,myuat
    I am running a compress command to compress a file in a directory and I get permission denied
    # cd /myprod/mycor/mycom/myarch
    # compress mytxtcom.20080804
    mytxtcom.20080804: Permission denied
    # ls -l mytxtcom.20080804
    ----rwx---+ 1 myuat pc 239268 Aug 5 00:23 mytxtcom.20080804*
    # getfacl mytxtcom.20080804
    # file: mytxtcom.20080804
    # owner: myuat
    # group: pc
    user::---
    group::rwx #effective:rwx
    group:hmis:r-- #effective:r--
    mask:rwx
    other:---
    # getfacl /myprod/mycor/mycom/myarch
    # file: /myprod/mycor/mycom/myarch
    # owner: root
    # group: pc
    user::---
    group::rwx #effective:rwx
    group:hmis:r-x #effective:r-x
    mask:rwx
    other:---
    I noticed that if I chown from:
    ----rwx---+ 1 myuat pc 239268 Aug 5 00:23 mytxtcom.20080804*
    TO:
    ----rwx---+ 1 root pc 239268 Aug 5 00:23 mytxtcom.20080804*
    then I will be able to compress the file, why? I wonder why "myuat" id is not able to compress file eventhough it belongs to same group?
    ----rwx---+ 1 myuat pc 42120 Aug 5 00:23 mytxtcom.20080804.Z*
    Any idea? Please help.
    Thanks

    Were you the root user when you compressed the file?
    It looks like the user 'myuat' does not have permission to write to the '/myprod/mycor/mycom/myarch' directory. You need to have write permission to the directory in order to compress a file in it, even if you have permission to write to the file itself.

  • How to check for a compressed file

    hi,
    I need to restrict the user to upload only compressed files (zip,sit etc.).
    how do u check whether the input file is compressed or not. is there any way to do that? or should i check only with the extension?
    Thanuja.

    Checking the extension is the best what you can do. You can also consider the java.util.zip API [1] to check if the file is decompressable, but that is rather expensive.
    [1] http://java.sun.com/j2se/1.5.0/docs/api/java/util/zip/package-summary.html

  • Passing a binary file to class outputing a compressed file

    Hi,
    Am i writing a program which gets passed a file to encode via "java compressor < <filename>".
    Compressor is a class with main method.
    what i have right now is simply:
    public class Compressor {
         * @param args the command line arguments
        public static void main(String[] args) {
            InputStream in = new FileInputStream ("");
            File f = new File ("");
            ByteArrayOutputStream out = new ByteArrayOutputStream (f.length());
            int i;
            while ((i = in.read()) != -1) {
                out.write(i);
            in.close();
            byte[] result = out.toByteArray();
            for (int j = 0 ; i < result.length ; j++) {
                byte a = result[j];
    } The program is suppose to read the input one byte at a time and treats each one as an instruction which encodes byte compressoring the file and finally outputing this newly compressed file. I'm not sure how the main method will take the filename i.e "java compressor examplefile", any guidance would help greatly.
    Thanks

    in the case above, the command line arguments are passed in the aaaaaaaaaaaaaaaaaaaaaaarggggggggggs array
    you probably want aaaaaaaaaaaaaaaaaaaaaaarggggggggggs[0] for the filenameAm not sure i understand, do you mean i must change the param of the main method to String[] args[0] as this resulted in error when i did so. Or do you mean at command line instead file simply being passed to the Compressor program as
    "java Compressor < examplefilename"
    It has to be "java Compressor < examplefilename[0]" ?
    If you could expand on this, would be grateful,
    Thanks.

  • Editing a compressed file

    So say I have a project in 1080i60 and i compress it down to an MP4 or just a smaller .mov at H.264. Then I delete the original 1080i60 but I need to change the volume level or cut out a small part of the movie. If I put the compressed file in FCP and export it...will it have the same compressed quality? I know obviously it wont be better quality....what is the best way to export it to maintain the quality...knowing that since it is already compressed?
    Or the basic question...should you even edit a compressed file or just take your loss and re-edit the original 1080i60?

    If all you are doing is cutting, then you probably will not be recompressing. An easy way to tell is how long it takes to export. It it looks like it will take a long time, then it is probably conforming and recompressing the video. That is bad. But it might be possible to cut out a portion, and save as a self-contained movie rather quickly.
    You could try doing that with QT Pro, as it is sometimes clearer than FCP about saving video versus compressing video. Some codecs require conforming in FCP if you look at them funny.
    As far as audio, I'm guessing you would be able to extract the audio and video tracks, modify the audio, and add the tracks back together. Again, I personally would feel better about this kind of track manipulation in QT Pro.

  • Reading a compress file in a jar.  JarFile or JarInputStream?

    I am trying to read a file out of a jar file. With the following code. Depending on where the file is I get different types of Objects returned. The file is quite big so I would like to compress it in the jar file. When I compress it I cannot use it. It works for the first two cases. On the third case I get an out of memory error. On the third case I tried to cast it as a ZipFile or ZipInputStream I get a runtime exception in the casting.
    What should I do to get this to work? I don't understand why Visual Cafe is telling me it is a ZipFile in the value section in the debugger.
    Object tin=(Object) getClass().getResourceAsStream(_cinfo.pbl);
    JDWC_customer.setSourceStream((java.io.InputStream) tin);
    CASE 1. File read off of disk.
    instance of java.io.BufferedInputStream(id=1089)
    CASE 2. File read out of a jar file uncompressed file.
    instance of java.util.zip.ZipFile$ZipFileInputStream(id=1089)
    CASE 3. File read out of a jar file compressed file.
    instance of java.util.zip.ZipFile$1(id=1417) File Compressed
    Does anyone have any sample code that does this?
    Thanks

    Since a jar file is a zip file, it doesn't make a lot of sense to me to compress the data twice. I would do one of these two things:
    1. Zip your data separately but do not include in your jar.
    Instead, provide the zip along with your jar file. Place a reference to your zip in the manifest of your jar -> in the Class-Path attribute.
    2. Let the jar zip your data up for you.
    Either way, I like to use the system classloader to grab data:
    InputStream is = ClassLoader.getSystemResourceAsStream("whatever.resource");-Ron

  • Context search in compressed files

    Is there any way of searching for content in compressed files?
    For example: if I have five text files in a zip file (and this zip is in iFS), iFS is able to make a context search inside those text files? In our application, the context search works great, but we faced this problem with the zip's.
    Thanks in advance,
    Fabio.

    Hi ,
    We too have the same problem apart from peformance problem.Looks like iFS API's need lot of improvements.

  • IMPORT & EXPORT from/to compressed files directly...

    for newbies a tip to import(export) directly to(from) compressed files using pipes . Its for Unix based systems only, as I am not aware of any pipe type functionality in Windows. The biggest advantage is that you can save lots of space as uncompressing a file makes it almost 5 times or more. (Suppose you are uncompressing a file of 20 GB, it will make 100 GB) As a newbie I faced this problem, so thought about writing a post.
    Lets talk about export first. The method used is that create a pipe, write to a pipe(ie the file in exp command is the pipe we created), side by side read the contents of pipe, compress(in the background) and redirect to a file. Here is the script that achieves this:
    export ORACLE_SID=MYDB
    rm -f ?/myexport.pipe
    mkfifo ?/myexport.pipe
    cat ?/myexport.pipe |compress > ?/myexport.dmp.Z &
    sleep 5
    exp file=?/myexport.pipe full=Y log=myexport.logSame way for import, we create a pipe, zcat from the dmp.Z file, redirect it to the pipe and then read from pipe:
    export ORACLE_SID=MYDB
    rm -f ?/myimport.pipe
    mkfifo ?/myimport.pipe
    zcat ?/myexport.dmp.Z > ?/myimport.pipe &
    sleep 5
    imp file=myimport.pipe full=Y show=Y log=?/myimport.logIn case there is any issue with the script, do let me know :)
    Experts, please have a look...is it fine ? (Actually I dont have Oracle installed on my laptop(though have Fedora 6) so couldnt test the scripts)
    I posted the same on my blog too. just for bookmark ;)
    Sidhu
    http://amardeepsidhu.blogspot.com

    actually, only the compression thing runs in the background. rest proceeds like normal only. just instead of giving normal file we use pipe as a file.
    nice article about named pipes
    Sidhu

  • I compressed Activity Monitor and deleted the compressed file in error. How do I get it back?

    In trying to reduce my CPU load, I compressed the Activity Monitor. Before I can use the compressed file, I mistakenly deleted it and now when I try to open it, I get the dreaded spinning wheel. After a long wait, I forced quit.
    What happened and how do I get Activity Monitor back?

    Never tamper with programs which come with the system. You could try downloading and applying the 'combo updater':
    http://support.apple.com/kb/DL1399
    However this won't help if Activity Monitor hasn't been updated since the initial release, which may well be the case. In that event you will need to reinstall Snow Leopard from your original install disks and then apply the combo updater again.
    Alternatively it may be possible to extract Activity Monitor from the installed disk by using Pacifist - no promises about that.

  • Compress files and folders in OS 10.6

    How do I compress files and folders in OS 10.6?

    If you have Compressor, there are many options to compress files.
    If you don't, there ere some QuickTime h,264 options available as well,
    But since you mention folders, I'm guessing that you're not referring to AV files specifically but to zipping generically. If so, right click and choose the Compress  option.

Maybe you are looking for

  • Opening pdf file in multi-monitor environment

    Hello: I have three monitors. The middle one is the main monitor (with the main taskbar). I use UltraMon to manage the monitors. Every time I open a pdf file (by clicking it in Wineows Explorer), it opens in the left-most monitor, regardless, for ins

  • PDFMaker Supported in Firefox?

    I use Firefox (v3.0.10) almost exclusively. I just upgraded to CS4 and notice that I do not have the opportunity to create PDFs from webpages without using the PDF print driver (where embedded links are not preserved). Does anyone know whether the PD

  • What are underlying APO tables for 0APO_DP_FORECAST_01 extractor?

    What are the underlying APO  tables from which the data is extracted on to PSA by 0APO_DP_FORECAST_01 extractor?

  • Can't reaches the target host!!!

    Hi guys, I’m trying to send a message trough receiver SOAP adapter. The message reaches the portal but stops on the WebSphere log! It means that can’t find the servelet, or maybe the path to the web service!?!? In j2ee monitor the status is: “The mes

  • Database block size and swap

    Hi, I changed the db_block_size from 4k(oracle 9.2.0.1) to 8k on my solaris machine. The swap use has increased dramatically I am wondering is there any relation between db_block_size and swap.