The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

muter - tool to convert between various formats

SYNOPSIS

muter -c chain [file...]

muter [--verbose] --help

DESCRIPTION

muter is a tool to process data by encoding and decoding it in various formats. The series of transforms being used is described by the chain.

Like most Unix command line tools, muter processes the files specified on the command line, or standard input if no files are specified. It produces output to standard output. Input and output are generally assumed to be a series of bytes; where character interpretation is required, UTF-8 is used.

A chain is a series of transforms separated by colons. A reverse transform (decoding) is specified by preceding the transform with a - character. If a transform takes parameters, they are separated by commas and follow the transform either surrounded by parentheses or preceded by a comma.

Not all transforms have an reverse transforms. For example, the hash transform, which implements cryptographic hashes, is not practically invertible (we hope). An exception will be thrown if you attmept to use an invalid transform.

Generally, a reverse transform will decode any variant of the forward transform. To preserve this invariant, related but incompatible transforms such as base64 and url64 are separate transforms.

OPTIONS

-c chain, --chain=chain

Specify the chain of transforms. This option is mandatory.

--help

List usage and all known transforms.

--verbose

With --help, provide a description for each transform parameter.

EXAMPLES

muter -c -base64:uri

Decode the standard input as Base64 and output it, encoding it using URI percent-encoding.

muter -c -hex:hash(sha256):base64 file

Read from file, which contains a single hex-encoded string, hash the result with SHA-256, and encode the result as base64. This chain could also be written as C-hex:hash,sha256:base64>, which may be easier to type.