mscompress
Compress files using Microsoft's compression algorithm
SYNOPSIS
mscompress [options] [input_file ...]
PARAMETERS
-c
Compress instead of decompress, or decompress to standard output.
-d
Decompress instead of compress (default).
-V
Verbose mode, display the compression ratio and details.
-q
Quiet mode, suppress most output.
-f
Force overwrite of existing output files. By default, `mscompress` will not overwrite existing files.
[input_file ...]
One or more input files to be compressed or decompressed. If no files are specified, `mscompress` reads from standard input and writes to standard output.
DESCRIPTION
The `mscompress` command allows you to compress or expand files using the Microsoft Compression Algorithm, often found in .CAB files. It provides functionality similar to the `compress` command but specifically targets the MS-compressed format, which is sometimes encountered when dealing with older Windows installation files or other applications using this compression method. It's especially useful when transferring files that were initially compressed on a Windows system using utilities leveraging this format to a Linux system for further processing. It provides a convenient way to deal with ms-compressed data without needing to resort to other, potentially less straightforward means. The process involves reading the uncompressed data from the input file(s) and writing the compressed data to the output file(s), or vice versa depending on whether you're compressing or uncompressing. `mscompress` acts as a simple but essential tool to convert between files with MS-compressed format.
CAVEATS
The MS Compression Algorithm used by `mscompress` is relatively old and has been superseded by more efficient and widely used compression formats such as gzip, bzip2, and xz. Its primary use is for dealing with legacy files or systems that specifically use this format. File extensions are not automatically modified (e.g. .cab extension is typically used).
FILE NAMING
By default, if no input file is given, `mscompress` reads from standard input and writes the compressed/decompressed output to standard output.
When specifying input files without the `-c` option, if an input file `foo` is to be decompressed, the decompressed output file will be named `foo.unc`.
If the `-c` option is provided, output can be redirected using standard shell redirection (`>`).
RETURN CODE
The `mscompress` command typically returns 0 on success and a non-zero value on failure (e.g., if it encounters an error during compression/decompression).
HISTORY
The `mscompress` command was created to handle the Microsoft Compression Algorithm, which was commonly used in older Windows systems for compressing files, particularly in .CAB files. Its inclusion in Linux distributions allowed for seamless handling of these files across platforms. The precise development timeline is a bit obscure, but it aimed to provide a native solution for dealing with this specific format.
SEE ALSO
compress(1), gzip(1), bzip2(1), xz(1), cabextract(1)