Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: How to make a compressed archive smaller

  1. #1
    Join Date
    Mar 2010
    Location
    /var/local
    Beans
    401
    Distro
    Ubuntu Development Release

    Red face How to make a compressed archive smaller

    I made a theme for gnome and now I want to publish it. the problem is, it must be no bigger than 1 megabyte, and it is 1.106... megabytes. I have already compressed it as a .tar.gz, and I don;t know what to do! help!

  2. #2
    Join Date
    Mar 2010
    Location
    Maine, US
    Beans
    117
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: How to make a compressed archive smaller

    I would try 7zip. There are a bunch of settings in there that will allow you to get different levels of compression based on what you are compressing. I can't tell you what the best settings are to use, but it would be worth downloading it and playing around some.
    Ubuntu 10.04
    Phenom II 955BE - Radeon 4870x2 - 8GB DDR3 - 2x Barracuda 1.5TB RAID 1 - Barracuda 750 GB - WB Green 1TB
    www.jellisontech.com

  3. #3
    Join Date
    Dec 2007
    Location
    California
    Beans
    4,899
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: How to make a compressed archive smaller

    Compress it with the --best flag, or try bzip2 which has a better compression rate.
    "You can't expect to hold supreme executive power just because some watery tart lobbed a sword at you"

    "Don't let your mind wander -- it's too little to be let out alone."

  4. #4
    Join Date
    Jan 2009
    Location
    Denmark
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: How to make a compressed archive smaller

    do
    Code:
    tar -cjtv (filename) (destination)
    example

    Code:
    tar -cjtv wuubi.txt /home/cristian/Desktop
    or something like that.

  5. #5
    Join Date
    Mar 2010
    Location
    /var/local
    Beans
    401
    Distro
    Ubuntu Development Release

    Re: How to make a compressed archive smaller

    drenriza, when I ran
    tar -cjtv (filename) (destination)
    it said:
    tar: You may not specify more than one `-Acdtrux' option
    Try `tar --help' or `tar --usage' for more information.
    e4uforums, I tried p7zip, and it made a .7z archive and compressed it but it is still 1.1 mb
    jerome1232, What command should I use with the --best flag? I tried bzip2 (if you mean as a .tar.bz2), but it was still about the same size, and still over 1 mb.

  6. #6
    Join Date
    Jan 2009
    Location
    Denmark
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: How to make a compressed archive smaller

    Okey, my mistake. Try
    Code:
    tar -cjfv (file/source) (destination)
    example
    Code:
    tar -cjfv file.txt /home/cristian/Desktop
    -c : Create
    -j : bz2 extension
    -f : Archive file
    -v : Verbose

  7. #7
    Join Date
    Dec 2007
    Location
    California
    Beans
    4,899
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: How to make a compressed archive smaller

    Well I would try zipping it in a different stage, just tar up the files, then use the actual compression program to compress.

    ie

    Code:
    tar cfv foo.tar /files/to/be/archived
    
    bunzip2 --best foo.tar
    at least I believe that's the usage of bzip, it's been awhile since i've used it and I have to dash off to work.


    Good Luck, 7zip is probably your best bet, I believe it's one of the best compression algorithms.
    "You can't expect to hold supreme executive power just because some watery tart lobbed a sword at you"

    "Don't let your mind wander -- it's too little to be let out alone."

  8. #8
    Join Date
    Mar 2010
    Location
    /var/local
    Beans
    401
    Distro
    Ubuntu Development Release

    Re: How to make a compressed archive smaller

    ok, sry if this is just because i'm a noob, but neither worked.
    Drenriza, your option looked like it was going to work this time, but after the initial
    mike-laptop .themes # tar -c -j -f -v BloodMintGtk /home/mike/Desktop
    tar: Removing leading `/' from member names
    it just sat there for a long time.

    jerome1232, your option also appeared to start working:
    mike-laptop .themes # tar cfv BloodMintGtk.tar /home/mike/.themes/BloodThemeGtk
    tar: Removing leading `/' from member names
    tar: /home/mike/.themes/BloodThemeGtk: Cannot stat: No such file or directory
    tar: Exiting with failure status due to previous errors
    no such file or directory? uhh, is that because it is hidden? or because I was running as root?
    also, when I went to look at my .themes folder, look what I found!
    BloodMintGtk BloodMintGtk.tar Clearlooks-2.0-blend FireDragonGtk -v
    "-v" appears to be an empty archive (see attachment)
    Attached Images Attached Images

  9. #9
    Join Date
    Feb 2010
    Location
    Silicon Valley
    Beans
    1,898
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: How to make a compressed archive smaller

    tar: /home/mike/.themes/BloodThemeGtk: Cannot stat: No such file or directory

    no such file or directory? uhh, is that because it is hidden? or because I was running as root?
    also, when I went to look at my .themes folder, look what I found!
    BloodMintGtk BloodMintGtk.tar Clearlooks-2.0-blend FireDragonGtk -v
    No, it's because you typed "BloodThemeGtk", not "BloodMintGtk".

    Try this:
    Code:
    cd $HOME/.themes
    tar cf BloodMintGtk.tar BloodMintGtk
    bzip2 BloodMintGtk.tar
    Last edited by gmargo; April 21st, 2010 at 05:39 PM.

  10. #10
    Join Date
    Mar 2010
    Location
    /var/local
    Beans
    401
    Distro
    Ubuntu Development Release

    Re: How to make a compressed archive smaller

    Oh lol thx for correcting that.
    It's very tiny now! only 46 bytes! but tha's because it is empty
    here's the output from the terminal:
    mike-laptop .themes # tar cf BloodMintGtk.tar BloodMintGtk
    tar: BloodMintGtk: Cannot stat: No such file or directory
    tar: Exiting with failure status due to previous errors
    mike-laptop .themes # bzip2 BloodMintGtk.tar
    bzip2: Output file BloodMintGtk.tar.bz2 already exists.
    mike-laptop .themes #
    the "already exists" part is because this is this second time I ran it, the first time it didnt say anything there. it put the BloodMintGtk.tar.bz2 in something like /proc/xxxx/cwd/, which is a shortcut. I went there and copied it to /root/, opened it, and it was empty.

    UPDATE:I just tried compressing it as a .tar.7z, and it is smaller that the others, but still too big a bit too big. the other compression algorithims I have are .tar.bz2 .tar.gz .tar.lzma .tar .zip .rar .jar .exe .cbz .cbr and .ar

    UPDATE 2:here are the sizes of my theme compressed with each of those:
    zip 1175058 bytes
    tar.lzma 1164285
    tar.gz 1160455
    tar.bz2 1167336
    tar.7z 1164648
    tar 1239040
    rar 1175394
    jar 1178280
    exe 1522742
    cbz 1164102
    cbr 1175394
    ar 1184166
    7z 1164102

    and next will come the sizes of the ones that can be compressed again with different algorithms

    Ok, nevermind, the nly one that can easily usefully be recompressed is the .ar, and it doesn't get much smaller with 7z of bz2
    Last edited by Crazedpsyc; April 22nd, 2010 at 03:11 PM. Reason: UPDATE 3

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

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