FUNCTION REFERENCE
gzip
Compress files with GNU zip.
Compress files with GNU zip.
Syntax
gzip(files)Syntax
gzfilenames = gzip(files, outputfolder)Writes name.gz next to each file, or into outputfolder (created when missing). Folder inputs include their files recursively; an explicit outputfolder receives the compressed files without their source folder hierarchy. files may also use * or ? wildcards.
Example
d=tempname(pwd); mkdir(d); f=fullfile(d,'a.txt'); fid=fopen(f,'w'); fprintf(fid,'hi'); fclose(fid); g=gzip(f); ok=exist(g{1},'file'); rmdir(d,'s'); ok % 2Differences from MATLAB: Files are limited to 256 MiB each.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.