MATLAB Function Reference Previous page   Next Page
gzip

Compress files into gzip format

Syntax

Description

gzip(files) creates gzip-files from the list of files specified in files.

files is a string or cell array of strings containing a list of files or directories to gzip. Paths specified in files must be either relative to the current directory or absolute. Directories recursively gzip all their contents. The output gzipped file is written to the same directory as the input files and with the file extension .gz.

gzip(files,outputdir) writes the gzipped file into the directory outputdir. outputdir is created if it does not exist.

filenames = gzip(...) gzips the files and returns the relative pathnames of all files in the gzip archive in the string cell array filenames.

Example

To gzip all .m and .mat files in the current directory and store the results in the directory archive,

See Also

gunzip, tar, untar, unzip, zip


Previous page  gunzip hadamard Next page

© 1994-2005 The MathWorks, Inc.