01-21-2009
hello sharadpisal,
do you mean to say that "gzip" had reduced the size of text file.
well, I did try it on a txt file.But still I got the .gz file to be a little greater in size than the real text file.
Can you please tell me the command you used to compress......
10 More Discussions You Might Find Interesting
1. Solaris
Hi,
I have the following problem.
I just have a new machine with mirroring. The logical volume for /opt is dimensionned to 75 GB which is to much. I want a volume of 10 GB. How can I reduce the size ?
I tried to reduce the size of the slice from 75 GB to 10 GB, but the size of the logical volume... (6 Replies)
Discussion started by: aribault
6 Replies
2. HP-UX
When i execute bdf, /home direcory seems 100% full. But when i check /home with 'du', total used memory is 30 MB in 1,4 Gb. how can I reduce this 100% to its real state? (11 Replies)
Discussion started by: akyuceisik
11 Replies
3. Shell Programming and Scripting
HPUX 11iv2 #!/bin/sh
Hi all. I have a script that results in the creation of an ascii file which is ultimately emailed out to several people. The email wraps each line so I would like to reduce the font size of the ascii file. I looked at nroff and also tr but it wasn't clear to me how to do... (2 Replies)
Discussion started by: lyoncc
2 Replies
4. Solaris
Hi,
We currently have an Oracle database running and it is creating lots of processes in the /proc directory that are 1000M in size. The size of the /proc directory is now reading 26T. How can this be if the root file system is only 13GB?
I have seen this before we an Oracle temp file... (6 Replies)
Discussion started by: sparcman
6 Replies
5. Solaris
I'm trying to reduce hard drive size (number of cylinders) in SPARC Solaris. Its easy to change last cylinder of last slice, but that cannot be done for slice2/backupslice because it insists on whole disk. If I try to change disk type/geometry, all slices get replaced with some 'default'... (1 Reply)
Discussion started by: orange47
1 Replies
6. Shell Programming and Scripting
Dear all,
i have a lot of .pdf files that i need to reduce size with pdf2ps and ps2pdf app. I need a script which i can reduce file size of all .pdf files in every subfolder of WORKDIR folder.
folder tree like:
WORKDIR
SUBBWORK DIR1
SUB_SUB_WORKDIR1
... (1 Reply)
Discussion started by: migor78
1 Replies
7. AIX
I am using xlC (Version: 11.01.0000.0011).
While build i am using "-g" to have debug information in build.
there are many object files (>500) due to which resultant shared file (.so) will have huge size.
I can't reduce optimization level.
Is there any way or flag is present by using which i... (2 Replies)
Discussion started by: Abhi04
2 Replies
8. UNIX for Dummies Questions & Answers
I have been searching both on Unix.com and Google and have not been able to find the answer to my question. I think it is partly because I can't come up with the right search terms.
Recently, my virtual server switched storage devices and I think the problem may be related to that change.... (2 Replies)
Discussion started by: jmgibby
2 Replies
9. Red Hat
Hi,
inode size reached its 100% in /var
Due to this i'am getting the error No space left on device
my crond process is stopped and when i want to restart it
it is showing the below error
Starting crond: crond: can't open or create /var/run/crond.pid: No space left on device
df -i o/p
... (3 Replies)
Discussion started by: Mohamed Thamim
3 Replies
10. Red Hat
Hi All,
I have one logical volume with size as 900G and it is mounted as xfs file system.
Now I want to reduce this partition to 500G.
So I followed the below steps.
unmount the mount point /home
Reduced the volume using the command
Now I remounted the partition.
But the problem... (3 Replies)
Discussion started by: kalpeer
3 Replies
LEARN ABOUT NETBSD
compress
COMPRESS(1) BSD General Commands Manual COMPRESS(1)
NAME
compress, uncompress -- compress and expand data
SYNOPSIS
compress [-cdfv] [-b bits] [file ...]
uncompress [-cdfv] [file ...]
DESCRIPTION
compress reduces the size of the named files using adaptive Lempel-Ziv coding. Each file is renamed to the same name plus the extension
``.Z''. As many of the modification time, access time, file flags, file mode, user ID, and group ID as allowed by permissions are retained
in the new file. If compression would not reduce the size of a file, the file is ignored.
uncompress restores the compressed files to their original form, renaming the files by deleting the ``.Z'' extension.
If renaming the files would cause files to be overwritten and the standard input device is a terminal, the user is prompted (on the standard
error output) for confirmation. If prompting is not possible or confirmation is not received, the files are not overwritten.
If no files are specified, the standard input is compressed or uncompressed to the standard output. If either the input and output files are
not regular files, the checks for reduction in size and file overwriting are not performed, the input file is not removed, and the attributes
of the input file are not retained.
The options are as follows:
-b Specify the bits code limit (see below).
-c Compressed or uncompressed output is written to the standard output. No files are modified.
-d Force decompression.
-f Force compression of file, even if it is not actually reduced in size. Additionally, files are overwritten without prompting for
confirmation.
-v Print the percentage reduction of each file.
compress uses a modified Lempel-Ziv algorithm. Common substrings in the file are first replaced by 9-bit codes 257 and up. When code 512 is
reached, the algorithm switches to 10-bit codes and continues to use more bits until the limit specified by the -b flag is reached (the
default is 16). Bits must be between 9 and 16.
After the bits limit is reached, compress periodically checks the compression ratio. If it is increasing, compress continues to use the
existing code dictionary. However, if the compression ratio decreases, compress discards the table of substrings and rebuilds it from
scratch. This allows the algorithm to adapt to the next "block" of the file.
The -b flag is omitted for uncompress since the bits parameter specified during compression is encoded within the output, along with a magic
number to ensure that neither decompression of random data nor recompression of compressed data is attempted.
The amount of compression obtained depends on the size of the input, the number of bits per code, and the distribution of common substrings.
Typically, text such as source code or English is reduced by 50-60%. Compression is generally much better than that achieved by Huffman cod-
ing (as used in the historical command pack), or adaptive Huffman coding (as used in the historical command compact), and takes less time to
compute.
The compress utility exits 0 on success, and >0 if an error occurs.
SEE ALSO
zcat(1)
Welch, Terry A., "A Technique for High Performance Data Compression", IEEE Computer, 17:6, pp. 8-19, June, 1984.
HISTORY
The compress command appeared in 4.3BSD.
BSD
January 23, 2003 BSD