Navigation

Operators and Keywords

Function List:

C++ API

: filelist = bzip2 (files)
: filelist = bzip2 (files, dir)

Compress the list of files specified in files.

files is a character array or cell array of strings. Shell wildcards in the filename such as ‘*’ or ‘?’ are accepted and expanded. Each file is compressed separately and a new file with a ".bz2" extension is created. The original files are not modified, but existing compressed files will be silently overwritten.

If dir is defined the compressed files are placed in this directory, rather than the original directory where the uncompressed file resides. Note that this does not replicate a directory tree in dir which may lead to files overwriting each other if there are multiple files with the same name.

If dir does not exist it is created.

The optional output filelist is a list of the compressed files.

See also: bunzip2, unpack, gzip, zip, tar.

Package: octave