MATLAB Function Reference Previous page   Next Page

Compress files into gzip format



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.


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.