*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> pack (1)              
Title
Content
Arch
Section
 

Contents


PACK(1)								       PACK(1)


NAME    [Toc]    [Back]

     pack, pcat, unpack	- compress and expand files

SYNOPSIS    [Toc]    [Back]

     pack [ - ]	[ -f ] name ...

     pcat name ...

     unpack name ...

DESCRIPTION    [Toc]    [Back]

     pack attempts to store the	specified files	in a compressed	form.
     Wherever possible (and useful), each input	file name is replaced by a
     packed file name.z	with the same access modes, access and modified	dates,
     and owner as those	of name.  The -f option	will force packing of name.
     This is useful for	causing	an entire directory to be packed even if some
     of	the files will not benefit.  If	pack is	successful, name will be
     removed.  Packed files can	be restored to their original form using
     unpack or pcat.

     pack uses Huffman (minimum	redundancy) codes on a byte-by-byte basis.  If
     the - argument is used, an	internal flag is set that causes the number of
     times each	byte is	used, its relative frequency, and the code for the
     byte to be	printed	on the standard	output.	 Additional occurrences	of -
     in	place of name will cause the internal flag to be set and reset.

     The amount	of compression obtained	depends	on the size of the input file
     and the character frequency distribution.	Because	a decoding tree	forms
     the first part of each .z file, it	is usually not worthwhile to pack
     files smaller than	three blocks, unless the character frequency
     distribution is very skewed, which	may occur with printer plots or
     pictures.

     Typically,	text files are reduced to 60-75% of their original size.  Load
     modules, which use	a larger character set and have	a more uniform
     distribution of characters, show little compression, the packed versions
     being about 90% of	the original size.

     pack returns a value that is the number of	files that it failed to
     compress.

     No	packing	will occur if:

	  the file appears to be already packed;
	  the file has links;
	  the file is a	directory;
	  the file cannot be opened;
	  no disk storage blocks will be saved by packing;
	  a file called	name.z already exists;
	  the .z file cannot be	created;
	  an I/O error occurred	during processing.




									Page 1






PACK(1)								       PACK(1)



     Directories cannot	be compressed.

     Pcat does for packed files	what cat(1) does for ordinary files, except
     that pcat cannot be used as a filter.  The	specified files	are unpacked
     and written to the	standard output.  Thus to view a packed	file named
     name.z use:

	  pcat name.z
     or	just:
	  pcat name

     To	make an	unpacked copy, say nnn,	of a packed file named name.z (without
     destroying	name.z)	use the	command:

	  pcat name >nnn

     Pcat returns the number of	files it was unable to unpack.	Failure	may
     occur if:

	  the file cannot be opened;
	  the file does	not appear to be the output of pack.

     Unpack expands files created by pack.  For	each file name specified in
     the command, a search is made for a file called name.z (or	just name, if
     name ends in .z).	If this	file appears to	be a packed file, it is
     replaced by its expanded version.	The new	file has the .z	suffix
     stripped from its name, and has the same access modes, access and
     modification dates, and owner as those of the packed file.

     Unpack returns a value that is the	number of files	it was unable to
     unpack.  Failure may occur	for the	same reasons that it may in pcat, as
     well as for the following:

	  a file with the ``unpacked'' name already exists;
	  if the unpacked file cannot be created.

NOTES    [Toc]    [Back]

     The suffix	.z is used by the commands pack/unpack.	The suffix .Z is used
     by	the commands compress/uncompress. The suffix .gz is used by the
     commands gzip/gunzip.

SEE ALSO    [Toc]    [Back]

      
      
     compress(1), uncompress(1), cat(1), gzip(1), gunzip(1).


									PPPPaaaaggggeeee 2222
[ Back ]
 Similar pages
Name OS Title
gzip IRIX compress or expand files
gzcat FreeBSD compress or expand files
gunzip FreeBSD compress or expand files
zcat FreeBSD compress or expand files
gzip FreeBSD compress or expand files
gzip Linux compress or expand files
compress OpenBSD compress and expand data
uncompress HP-UX compress and expand data
compress FreeBSD compress and expand data
uncompressd HP-UX compress and expand data
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service