···11# cmprss
2233-Status: pre-alpha
33+**Status: Pre-alpha.**
44+Lacks formal testing.
55+CLI is reasonably stable but still being tweaked.
66+77+A compression multi-tool for the CLI. Replace `tar` with something you can remember. [Relevant XKCD](https://xkcd.com/1168/).
88+99+## Usage
1010+1111+The primary goal of the CLI is to make it easy and consistent to work with any compression format.
1212+All of the examples will work with _any_ of the supported compression formats.
1313+Some formats will fail in certain scenarios, as they don't support certain types of input/output; for example `tar` is unable to support compressing from `stdin` and extracting to `stdout`.
1414+1515+All commands read from left to right, input is always either piped from `stdin` or the first filename specified, and output is either `stdout` or the next filename (the first if using `stdin`, the second if using a filename for input).
1616+1717+If output filenames are left out, `cmprss` will try to infer the filename based on the compression type.
1818+1919+### Examples
2020+2121+Compress a file/directory to a `tar` archive:
2222+2323+```
2424+cmprss tar filename
2525+cmprss tar filename my_preferred_output_name.tar
2626+```
2727+2828+Extract a `tar` archive:
2929+3030+```
3131+cmprss tar --extract filename.tar
3232+cmprss tar --extract filename.tar custom_output_directory
3333+```
3434+3535+`cmprss` will detect if `stdin` or `stdout` is a pipe, and use those for I/O.
43655-A compression multi-tool for the CLI.
3737+Create and extract a `tar.gz` archive with pipes:
63877-Currently supports basic operations on `tar` and `gzip` archives.
3939+```
4040+cmprss tar directory_name | cmprss gzip > directory.tar.gz
4141+cmprss gzip --extract directory.tar.gz | cmprss tar --extract new_directory
4242+```
843944## Supported formats
10451146- gzip
1247- tar
4848+4949+TODO: Add more compression algos now that the internal API is mostly stable.