Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
24
Добавлен:
09.02.2015
Размер:
324.1 Кб
Скачать

Gzip file access

<gzip> - Compress files into GNU zip files.

GZIP Compress files into GNU zip files.

GZIP(FILES) creates GNU zip 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. Files specified in FILES can be a MATLABPATH relative

partial filename. Directories specified in FILES must be either

relative to the current directory or absolute. On UNIX systems,

directories may also start with a "~/" or a "~username/", which expands

to the current user's home directory or the specified user's home

directory, respectively. FILES may contain the wildcard character '*'

but must be either relative to the current directory or specified with

an absolute directory. Directories recursively gzip all of their

content. The output gzipped files are 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 path

names of the gzipped files into the string cell array, FILENAMES.

Example

-------

% gzip all *.m and *.mat files in the current directory and store the

% results into the directory 'archive'.

gzip({'*.m','*.mat'},'archive');

See also gunzip, tar, untar, unzip, zip.

Reference page in Help browser

doc gzip

<gunzip> - Uncompress GNU zip files.

GUNZIP Uncompress GNU zip files.

GUNZIP(FILES) uncompresses GNU zip files from the list of files

specified in FILES. Directories recursively gunzip all of their

content. The output gunzipped files have the same name, excluding the

extension '.gz', and are written to the same directory as the input

files.

FILES is a string or cell array of strings that specify the files or

directories to be uncompressed. Individual files that are on the

MATLABPATH can be specified as partial pathnames. Otherwise an

Individual file can be specified relative to the current directory or

with an absolute path. Directories must be specified relative to the

current directory or with absolute paths. On UNIX systems, directories

may also start with a "~/" or a "~username/", which expands to the

current user's home directory or the specified user's home directory,

respectively. The wildcard character '*' may be used when specifying

files or directories, except when relying on the MATLABPATH to resolve

a filename or partial pathname.

GUNZIP(FILES, OUTPUTDIR) writes the gunzipped file into the directory

OUTPUTDIR. OUTPUTDIR is created if it does not exist.

GUNZIP(URL, ...) extracts the gzip contents from an Internet URL. The

URL must include the protocol type (e.g., "http://"). The URL is

downloaded to the temp directory and deleted.

FILENAMES = GUNZIP(...) gunzips the files and returns the relative path

names of the gunzipped files into the string cell array, FILENAMES.

Examples

--------

% gunzip all *.gz files in the current directory

gunzip('*.gz');

% gunzip Cleve Moler's Numerical Computing with MATLAB examples

% to the output directory 'ncm'.

url ='http://www.mathworks.com/moler/ncm.tar.gz';

gunzip(url,'ncm')

untar('ncm/ncm.tar','ncm')

See also gzip, tar, untar, unzip, zip.

Reference page in Help browser

doc gunzip

Соседние файлы в папке Библиотеки Matlab